The PHP function date is used to display examples.
The current date and time are used for the examples.
The -dddd shown at the end of the full date and time
(r format string) is the offset from Greenwich Mean Time.
Format String |
Meaning |
Example |
---|---|---|
r | Full date and time | |
T | Time zone | |
s | Seconds | |
i | Minutes | |
A | A.M. or P.M. | |
a | a.m. or p.m. | |
h | Hour, 12-hour clock | |
g | Hour, 12-hour clock, no leading zero | |
H | Hour, 24-hour clock | |
G | Hour, 24-hour clock, no leading zero | |
j | Day of month | |
z | Day of year | |
D | Abbreviated weekday name | |
l | Full weekday name | |
S | English ordinal suffix for day of month | |
F | Full month name | |
M | Abbreviated month name | |
m | Month number | |
n | Month number, no leading zero | |
Y | Year with century | |
y | Year without century |