Format local date and time according to locale settings:
The strftime() function formats a local time and/or date according to locale settings.
Tip: Also look at the gmstrftime() function, which formats a GMT/UTC time and/or date according to locale settings.
| Parameter | Description |
|---|---|
| format | Required. Specifies how to return the result:
|
| timestamp | Optional. Specifies a Unix timestamp that represents the date and/or time to be formatted. Default is the current local time (time()) |
| Return Value: | Returns a string formatted according format using the given timestamp. Month and weekday names and other language-dependent strings respect the current locale set with setlocale() |
|---|---|
| PHP Version: | 4+ |
| Changelog: | PHP 5.1.0: Now issues E_STRICT and E_NOTICE time
zone errors |
PHP Date/Time Reference
The perfect solution for professionals who need to balance work, family, and career building.
More than 10 000 certificates already issued!
The HTML Certificate documents your knowledge of HTML.
The HTML5 Certificate documents your knowledge of advanced HTML5.
The CSS Certificate documents your knowledge of advanced CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The jQuery Certificate documents your knowledge of jQuery.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
Your message has been sent to W3Schools.