This commit is contained in:
2024-11-24 15:38:28 +05:00
parent 04a5bb0f2b
commit 92ea99051c
2 changed files with 38 additions and 15 deletions

View File

@@ -212,11 +212,8 @@ function convertToOriginalFormat($apiPrice)
function lastDayOfMonth($month, $year)
{
// Create a DateTime object for the first day of the given month
$date = new DateTime("$year-$month-01");
// Modify the date to the last day of the same month
$date->modify('last day of this month');
// Return the formatted date
return $date->format('d');
return $date;
}