PHP 8.2
Posted: Thu Aug 17, 2023 8:41 am
Hi there
I need to confirm some changes to upcoming deprecated functions.
I'm sure a class can be created or date.php can be updated for replacing the strftime
Example
Though it checks out, am i heading in the correct way or something better to suggest?
I have like 22 places where strftime is used.
I need to confirm some changes to upcoming deprecated functions.
I'm sure a class can be created or date.php can be updated for replacing the strftime
Example
Code: Select all
<?php // printf(MODULE_CONTENT_CARD_PRODUCTS_HEADING, strftime('%B')); ?>
<h4><?php
$dateTimeObj = new DateTime('now', new DateTimeZone(date_default_timezone_get()));
printf(MODULE_CONTENT_CARD_PRODUCTS_HEADING, (IntlDateFormatter::formatObject($dateTimeObj, 'MMMM', date_default_timezone_get() )));
?></h4>
I have like 22 places where strftime is used.