Day |
--- |
--- |
D |
The day of the month, which has two digits leading to zero |
01 to 31 |
D |
The day of the week. The text indicates three letters. |
Mon to Sun |
J |
The day of the month, with no leading zero |
1 to 31 |
L (lowercase letters of "L) |
Day of week, complete text format |
Sunday to Saturday |
N |
The day of the week represented by a number in the ISO-8601 format (New in PHP 5.1.0) |
1 (Monday) to 7 (Sunday) |
S |
English suffix after the number of days per month, 2 Characters |
St, nd, rd or th. Can be used with j |
W |
The day of the week, represented by a number |
0 (Sunday) to 6 (Saturday) |
Z |
The day of the year. |
0 to 366 |
Week |
--- |
--- |
W |
The week of the year in ISO-8601 format, starting from Monday each week (New in PHP 4.1.0) |
Example: 42 (42nd weeks of the current year) |
Month |
--- |
--- |
F |
The month in the complete text format, such as January or March. |
January to December |
M |
Number indicates the month, with a leading zero |
01 to 12 |
M |
The month abbreviated to three characters. |
Jan to Dec |
N |
Number indicates the month, with no leading zero |
1 to 12 |
T |
Number of days in a given month |
28 to 31 |
Year |
--- |
--- |
L |
Is it a leap year? |
If the leap year is 1, otherwise it is 0 |
O |
The number of years in ISO-8601 format. This is the same as Y, except that the Week number (W) of ISO belongs to the previous year or the next year. (New PHP 5.1.0) |
Examples: 1999 or 2003 |
Y |
The year in which the four digits represent the complete number. |
Example: 1999 or 2003 |
Y |
A two-digit year |
Example: 99 or 03 |
Time |
--- |
--- |
A |
Morning and afternoon values in lower case |
Am or pm |
A |
Upper-case morning and afternoon values |
AM or PM |
B |
Swatch Internet standard |
000 to 999 |
G |
Hour, 12-hour format, no leading zero |
1 to 12 |
G |
Hour, in 24-hour format, no leading zero |
0 to 23 |
H |
Hour, 12-hour format, with leading zero |
01 to 12 |
H |
Hour, in 24-hour format, with a leading zero |
00 to 23 |
I |
Minutes with a leading zero |
00 to 59> |
S |
Number of seconds, with a leading zero |
00 to 59> |
Time Zone |
--- |
--- |
E |
Time zone ID (New in PHP 5.1.0) |
Example: UTC, GMT, Atlanta/Azores |
I |
When it is enabled or not |
If this parameter is set to 1, otherwise it is set to 0. |
O |
Hours different from Greenwich Mean Time |
For example: + 0200 |
P |
Difference from Greenwich Mean Time (GMT), separated by colons between hours and minutes (New in PHP 5.1.3) |
Example: + |
T |
Time zone of the Local Machine |
For example, EST and MDT are in full text format in Windows. For example, "Eastern Standard Time" is displayed in Chinese "). |
Z |
The number of seconds of the time difference offset. The Time Zone offset to the west of UTC is always negative, and the time zone offset to the east of UTC is always positive. |
-43200 to 43200 |
Complete date/time |
--- |
--- |
C |
Date in ISO 8601 format (New in PHP 5) |
2004-02-12T15: 19: 21 + 00: 00 |
R |
Date in RFC 822 format |
Example: Thu, 21 Dec 2000 16:01:07 + 0200 |
U |
Number of seconds since Unix epoch (January 1 1970 00:00:00 GMT) |
See time () |