- Using the function date () implementation
- <?php echo $showtime =Date ("y-m-d h:i:s");? >
- Format displayed: Year-month-day hour: minute: Wonderful
- Relevant time parameters:
- A- "AM" or "PM"
- A- "AM" or "PM"
- D-A few days, two digits, if less than two is the front 0; such as: "01" to " +"
- D-Days of the week, three English letters; such as: "Fri"
- F-month, full name in English; such as: "January"
- H-12 hours of the hour; such as: "01" to " a"
- H-hour of 24-hour system; such as: "00" to " All"
- G-12 hours of the hour, less than two digits do not fill 0; such as: "1" to "
- G-24 hours of the hour, less than two does not fill 0; such as: "0" to " All"
- I-minute; such as: "00" to " the"
- J-A few days, two digits, if less than two bits do not fill 0; such as: "1" to " +"
- L-Day of the week, English full name; such as: "Friday"
- M-month, two digits, if less than two digits in front of 0; such as: "01" to " a"
- N-month, two digits, if less than two digits does not fill 0; such as: "1" to " a"
- M-month, three letters of English; such as: "Jan"
- S-second; such as: "00" to " the"
- S-End With English ordinal number, two English letters; such as: "th","nd"
- T-the number of days in the specified month; such as: "28" to " +"
- U-Total number of seconds
- W-Number of days of the week, such as: "0" (Sunday) to "6" (Saturday)
- Y-year, four digits; such as: "1999"
- Y-year, two digits; such as: " the"
- Z-the day ordinal of a year; such as: "0" to "365"
PHP Date Format parameter comparison