The required format parameter in the date() function specifies how to format the date/time.
Here are some characters that can be used:
Function |
Description |
PHP |
Validates a Gregorian date |
3 |
|
Returns the default time zone |
5 |
|
Sets the default time zone |
5 |
|
Returns the time of sunrise for a given day / location |
5 |
|
Returns the time of sunset for a given day / location |
5 |
|
Formats a local time/date |
3 |
|
Returns an array that contains date and time information for a Unix timestamp |
3 |
|
Returns an array that contains current time information |
3 |
|
Formats a GMT/UTC date/time |
3 |
|
Returns the Unix timestamp for a GMT date |
3 |
|
Formats a GMT/UTC time/date according to locale settings |
3 |
|
Formats a local time/date as integer |
5 |
|
Returns an array that contains the time components of a Unix timestamp |
4 |
|
Returns the microseconds for the current time |
3 |
|
Returns the Unix timestamp for a date |
3 |
|
Formats a local time/date according to locale settings |
3 |
|
Parses a time/date generated with strftime() |
5 |
|
Parses an English textual date or time into a Unix timestamp |
3 |
|
Returns the current time as a Unix timestamp |
3 |