formating date invoice
This commit is contained in:
parent
9fb72d320e
commit
4c911cf4fc
@ -131,13 +131,24 @@ class DateHelpers
|
||||
}
|
||||
return $totalHours;
|
||||
}
|
||||
public static function convertInvoiceDateToMonthAndYearOnly($invoiceDate = null){
|
||||
if(!$invoiceDate){
|
||||
return "";
|
||||
}
|
||||
$dateTime = new DateTime($invoiceDate);
|
||||
$formattedDate = strftime('%B %Y', $dateTime->getTimestamp());
|
||||
return $formattedDate;
|
||||
public static function convertInvoiceDateToMonthAndYearOnly($invoiceDate = null)
|
||||
{
|
||||
if (!$invoiceDate) {
|
||||
return "";
|
||||
}
|
||||
|
||||
$dateTime = new DateTime($invoiceDate);
|
||||
|
||||
$formatter = new IntlDateFormatter(
|
||||
'fr_FR',
|
||||
IntlDateFormatter::LONG,
|
||||
IntlDateFormatter::NONE,
|
||||
null,
|
||||
null,
|
||||
'MMMM yyyy'
|
||||
);
|
||||
|
||||
return ucfirst($formatter->format($dateTime));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user