This article provides a detailed analysis of PHP call time format parameters. For more information, see
This article provides a detailed analysis of PHP call time format parameters. For more information, see
1. Call syntax
Use date () to obtain the current time format, for example:
2. Time Format parameter settings
In the above syntax, "Y-m-d H: I: s" is displayed in the format of year-month-day hour: minute: Second
In this case, for the Hong Kong server, we only need to obtain the corresponding time parameters to replace the desired time format!
A-"am" or "pm"
A-"AM" or "PM"
D-a few days, two digits. If there are less than two digits, add zero in front, for example, "01" to "31 ″
D-the day of the week, with three English letters, for example, "Fri"
F-month, full English name, for example, "January"
H-12 hours, for example, "01" to "12 ″
H-24 hours, for example, "00" to "23 ″
For hours in the g-12 hour format, less than two do not fill in the zero; for example: "1" to 12 ″
For hours in the G-24 hour system, less than two do not make up zero; for example, "0" to "23 ″
I-minutes; for example, "00" to "59 ″
J-a few days, two digits. If less than two digits are left blank, for example, "1" to "31 ″
L-the day of the week, full name in English; for example, "Friday"
M-month, two digits. If there are less than two digits, add zero in front. For example, "01" to "12 ″
N-month, two digits. If less than two digits are left blank, for example, "1" to "12 ″
M-month, with three English letters, for example, Jan"
S-seconds; for example, "00" to "59 ″
The end of the S-character is followed by an English sequence number with two English letters, such as "th" and "nd"
T-specifies the number of days in a month. For example, "28" to "31 ″
U-total seconds
W-number of weeks, for example, "0" (Sunday) to "6" (Saturday)
Y-year, Hong Kong virtual host, four digits; for example: "1999 ″
Y-year, two digits, for example, "99 ″
Z-the day of the year. For example, "0" to "365 ″
, Website Space