Merge branch 'staging' into releases/release-hytha-prod

This commit is contained in:
Tiavina 2025-03-18 10:19:21 +03:00
commit c07c4aaf88

View File

@ -131,13 +131,24 @@ class DateHelpers
} }
return $totalHours; return $totalHours;
} }
public static function convertInvoiceDateToMonthAndYearOnly($invoiceDate = null){ public static function convertInvoiceDateToMonthAndYearOnly($invoiceDate = null)
{
if (!$invoiceDate) { if (!$invoiceDate) {
return ""; return "";
} }
$dateTime = new DateTime($invoiceDate); $dateTime = new DateTime($invoiceDate);
$formattedDate = strftime('%B %Y', $dateTime->getTimestamp());
return $formattedDate; $formatter = new IntlDateFormatter(
'fr_FR',
IntlDateFormatter::LONG,
IntlDateFormatter::NONE,
null,
null,
'MMMM yyyy'
);
return ucfirst($formatter->format($dateTime));
} }
} }