PHP date and Time Functions date () 1, year-month-day echo date ('Y-m-J'); 2007-02-6 echo date ('Y-n-J '); 07-2-6 uppercase Y indicates four digits of the year, while lowercase y indicates two digits of the Year. lowercase m indicates the number of the month (with the leading digit ), n in lower case indicates that the number of the month does not contain the leading number. Echo date ('Y-M-J'); 2007-Feb-6 echo date ('Y-m-d'); 2007-2-06 upper case M indicates three abbreviations of the month, in lower case, m indicates the number of the month (with the leading 0); In less case, J indicates the date of the month, and no leading o; use lowercase d if the month has a prefix. Echo date ('Y-M-J'); 2007-Feb-6 echo date ('Y-F-js'); 2007-February-6th capital M represents three abbreviations of the month, in upper case, F indicates the English full write of the month. (No lowercase f) uppercase S indicates the suffix of the date, such as "st", "nd", "rd", and "th". For details, see the date number. Summary: The year can be uppercase Y and lowercase y; the month can be uppercase F, uppercase M, lowercase m, and lowercase n (two types of characters and numbers respectively ); indicates the date suffix. 2, hour: minute: by default, PHP interprets the display time as "Greenwich Mean Time", which is 8 hours different from our local time. Echo date ('G: I: s A'); 5:56:57 am echo date ('H: I: s A'); 05:56:57 AM lowercase g indicates 12-hour format, no leading 0, while lowercase h indicates a 12-hour system with leading 0. When the 12-hour format is used, it indicates that upper afternoon, lower case a indicates lower case "am" and "pm", and upper case A indicates upper case "AM" and "PM ". Echo date ('G: I: s'); 14:02:26 uppercase G indicates the number of hours in the 24-hour system, but without leading; use uppercase H to indicate the number of hours in the 24-hour format with the leading character. The letter g indicates that the hour does not have the leading character, and the letter h indicates that the hour has the leading character. The lowercase g and h indicate that the 12-hour format, uppercase G and H indicate the 24-hour format. 3. leap year, Week, and day echo date ('l'); this year's leap year: 0 echo date ('l'); today is: Tuesday echo date ('D '); today is: Tue capital L indicates whether to determine the leap year of the Year, Boolean value, True returns 1; otherwise, 0; lowercase l indicates the day of the week in full (Tuesday ); however, uppercase D is used to represent the three abbreviation of the day of the week (Tue ). Echo date ('W'); today's week: 2 echo date ('W'); this week is the first week of the year. lowercase w indicates the day of the week, in the digit format, W indicates the number of weeks in a year. echo date ('T'); this month is 28 days echo date ('Z '); today is the second day of this year. lowercase t indicates the number of days in the current month. lowercase z indicates that today is the fourth day of this year. Other echo date ('T '); UTC capital T indicates that echo date ('I') is set for the time zone of the server; 0 capital I indicates that 1 is returned if the current value is success, otherwise, the value is 0 echo date ('U'). The value 1170769424 indicates the total number of seconds from January 1, January 1, 1970 to the present, which is the Unix timestamp of the UNIX time era. Echo date ('C'); 2007-02-06T14: 24: 43 + 00: 00 lowercase c Represents the ISO8601 date, the date format is YYYY-MM-DD, with the letter T to separate the date and time, the time format is HH: MM: SS, and the time zone is expressed by GMT deviation. Echo date ('R'); Tue, 06 Feb 2007 14:25:52 + 0000 lowercase r indicates the RFC822 date.