strftime

string strftime(string format, [int timestamp]) 
format Format for time and date
timestamp Date information to be formatted

Formats a local time or date according to locale settings.

Returns:

Formatted date string; FALSE on error

Description:

strftime() provides a date-formatting functionality that resembles a combination of the sprintf() and date() functions. However, it also takes into account the locale settings of the system on which it executes, so locale- and language-dependent items in the string will be formatted and printed correctly.

If timestamp is not given, the current time will be used.

Quite a large number of format specifiers are available for strftime(), but not all of them are supported by all systems. (PHP uses ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.