Day |
--- |
--- |
D |
The day ordinal of a month with a leading zero 2-digit number |
01 to 31 |
D |
Day of the week, text representation, 3 letters |
Mon to Sun |
J |
The day ordinal of the month without leading zeros |
1 to 31 |
L (Lowercase letter of "L") |
Day of the week, full text format |
Sunday to Saturday |
N |
ISO-8601 format number represents the day of the week (PHP 5.1.0 new Plus) |
1 (for Monday) to 7 (= Sunday) |
S |
English suffix, 2 characters, after the number of days per month |
st,nd,rd or th. Can be used with J. |
W |
Day of the week, numbers indicate |
0 (for Sunday) to 6 (= Saturday) |
Z |
The day ordinal of the year |
0 to 366 |
Week |
--- |
--- |
W |
Week of the ISO-8601 format year, starting from Monday (PHP 4.1.0 New) |
Example: 42 (42nd Week of the year) |
Month |
--- |
--- |
F |
month, full text format, such as January or March |
January to December |
M |
A number represents the month, with a leading zero |
01 to 12 |
M |
Three letter abbreviation for month |
Jan to Dec |
N |
The number represents the month, without leading zeros |
1 to 12 |
T |
The number of days that a given month should be |
28 to 31 |
Years |
--- |
--- |
L |
Whether it is a leap year |
If the leap year is 1, otherwise 0 |
O |
ISO-8601 format year number. This is the same value as Y, except if the day of the Week (W) of the ISO belongs to the previous year or the next year. (PHP 5.1.0 new addition) |
examples:1999 or 2003 |
Y |
4-digit year in full representation |
Example: 1999 or 2003 |
Y |
Year 2-digit representation |
Example: 99 or 03 |
Time |
--- |
--- |
A |
Lowercase morning and afternoon values |
AM or PM |
A |
Uppercase morning and afternoon values |
AM or PM |
B |
Swatch Internet Standard Time |
000 to 999 |
G |
Hours, 12-hour format, no leading zeros |
1 to 12 |
G |
Hours, 24-hour format, no leading zeros |
0 to 23 |
H |
Hours, 12-hour format, with leading zeros |
01 to 12 |
H |
Hours, 24-hour format, with leading zeros |
00 to 23 |
I |
Number of minutes with leading zeros |
00 to 59> |
S |
Number of seconds with leading zeros |
00 to 59> |
Time |
--- |
--- |
E |
Time zone ID (PHP 5.1.0 new addition) |
Example: Utc,gmt,atlantic/azores |
I |
Whether it is daylight saving time |
If daylight saving time is 1, otherwise 0 |
O |
Hours of difference from GMT |
Example: +0200 |
P |
Difference from GMT (GMT), between hours and minutes colon separated (PHP 5.1.3 New) |
Example: +02:00 |
T |
The time zone in which this machine resides |
For example: EST,MDT ("translator note" in the full text format under Windows, such as "Eastern Standard Time", the Chinese version will show "China normal times"). |
Z |
The number of seconds of the slack offset. The time zone offset in the west of UTC is always negative, and the time zone offset to the east of UTC is always positive. |
43200 to 43200 |
Full Date/Time |
--- |
--- |
C |
Date in ISO 8601 format (PHP 5 new) |
2004-02-12t15:19:21+00:00 |
R |
Date in RFC 822 format |
Example: Thu, DEC 2000 16:01:07 +0200 |
U |
The number of seconds since the Unix era (January 1 1970 00:00:00 GMT) started |
See Time () |