Closed eSilverStrike closed 2 years ago
Basically, IntlDateFormatter::format () can output in four formats:
Type | Date | Time |
---|---|---|
IntlDateFormatter::FULL | Tuesday, April 12, 1952 AD | 3:30:42pm PST |
IntlDateFormatter::LONG | January 12, 1952 | 3:30:32pm |
IntlDateFormatter::MEDIUM | Jan 12, 1952 | |
IntlDateFormatter::SHORT | 12/13/52 | 3:30pm |
We cannot get, for example, only the day or the month name using this function. We have full month names in $LANG_MONTH and full day names in $LANG_WEEK. How about adding $LANG_MONTH_SHORT (e.g. 'Jan'..'Dec') and $LANG_WEEK_SHORT (e.g. 'Mon'..'Sat') and using date() function?
OK, I replaced strftime() with COM_strftime() and gmstrftime() with COM_gmstrftime(), using date() and items from language files.
Finished with Geeklog core, core plugins, messenger, and ban.
Done with mediagallery
That was a lot of work for you. I will update the forum to use your new functions.
Forum now done. Also updated the GeSHI library to the latest version which had other PHP fixes as well
Geeklog and many plugins including but not necessarily limited to:
use strftime all over the place (and in some places gmstrftime)
We will need to switch in a replacement as these functions have been depreciated as of 8.1 and will be removed by PHP 9:
https://php.watch/versions/8.1/strftime-gmstrftime-deprecated#replacements
Some Geeklog vendor libraries like Oauth also use it.
Replacement or work around needs to work with PHP 5.6