What is the syntax of the strftime() function in PHP?
strftime(format, timestamp)
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()) |
Examples of the strftime() function
Example 1. In this example,
<?php
echo(strftime("%B %d %Y, %X %Z",mktime(20,0,0,12,31,98))."<br>");
setlocale(LC_ALL,"hu_HU.UTF8");
echo(strftime("%Y. %B %d. %A. %X %Z"));
?>