| function fmtdate( | $fmt, | | | | $ts | = | false | ) |
|
Print a formatted date.
This function exists because strftime prints localized strings using the local character set. So, for example, if you are running on Windows and set the locale to “rus” (Russian”), then you get a the Windows Russian date, which is in whatever 2-byte encoding Windows uses for Russian. Needless to say, this breaks the page.
The ugly, hacky solution is to offer the user the alternative of using strftime, which respects the locale and hence causes problems, or date, which is stupid and ignores the locale.
Parameters
| fmt | The format string for the date |
| ts | The optional timestamp to use for the date. |
Returns
The formatted date string.