PHP date knowledge. (1) date usage: date (format, [time]); if there is no time parameter, the current time is used. the format is a string, the following characters have special significance: U is replaced with a start time (good (1) date
Usage: date (format, [time]);
If there is no time parameter, the current time is used. the format is a string. The following characters have special meanings:
U is replaced by the number of seconds since the start time (like January 1, 1970 ).
Y is replaced with the 4-digit year number.
Y is replaced with the 2-digit year number.
F is replaced with the full name of the month.
M is replaced with the abbreviation of the month.
M is replaced with the monthly number of copies.
Z is replaced by the number of days since January 1 of the current year.
D. replace it with the daily number.
L replace it with the full name of the day of the week.
D. replace it with the abbreviation of the day of the week.
W is replaced with the day of the week (number ).
Replace H with the hour (in the 24-hour format ).
Replace h with the hour (in 12-hour format ).
Replace I with the number of minutes.
Replace s with the number of seconds.
A is replaced with "AM" or "PM ".
A is replaced with "am" or "pm ".
S is replaced with a sequential numeric suffix, for example, "st", "nd", "rd", "th ".
(2) PHP calculation of two time differences
$ Date = floor (strtotime ($ enddate)-strtotime ($ startdate)/86400 );
Http://www.bkjia.com/PHPjc/760670.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/760670.htmlTechArticle (1) date usage: date (format, [time]); use the current time if there is no time parameter. the format is a string. The following characters have special meanings: U is replaced with a start time (good...