Showing date
Posted: Mon Dec 09, 2024 7:52 am
I created a pi module to show the customers when a special price will expire.
Showing the expiry date is bit wrong - example the expiry date is set as 2024-12-30 23:59:59 as in the database, the result for the customers is showing Mon 09 Dec 09:12 (the 09 part as day)
The code is
If i use expound or abridge then it shows correct date - example Monday, December 30, 2024
Figures there's an issue on how i tried to use D d M
My question will be how to fix and show shortened Month name?
Showing the expiry date is bit wrong - example the expiry date is set as 2024-12-30 23:59:59 as in the database, the result for the customers is showing Mon 09 Dec 09:12 (the 09 part as day)
The code is
Code: Select all
<?= sprintf(PI_SPECIALS_EXPIRY_TEXT, date('D d M h:m'), $special['expires_date']) ?>
Figures there's an issue on how i tried to use D d M
My question will be how to fix and show shortened Month name?