The output Date and Time In WordPress can be used :? Phpthe_time (Y, m, D, H: I );?. Let me take a look at the specific meanings of parameters in the WordPress function the_time. The meaning of the date (year-month-day :? Phpthe_time (Y-m-j );? Output: 2007-02-6? Phpthe_time (y-n-j );?? Output: 07-2-6
The output Date and Time In WordPress can be used :? Php the_time ('y, m, D, H: I ');? . Let me take a look at the specific meanings of parameters in the WordPress function the_time. The meaning of the date (year-month-day :? Php the_time ('Y-m-J ');? Output: 2007-02-6? Php the_time ('Y-n-J ');? ? Output: 07-2-6
The output Date and Time In WordPress can be used:
.
Let me take a look at the WordPress functions.the_time()
The specific meaning of the parameters.
The meaning of the date (year-month-day:
Output: 2007-02-6
Output: 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), while lowercase n indicates the number of the month without the leading digit.
Output: 2007-Feb-6
Output: 2007-02-06
Uppercase M indicates the three abbreviations of the month, while lowercase m indicates the number of the month (with leading 0 );
There is no upper-case J. only lower-case j indicates the date of the month, and there is no leading o. If the month needs to have the upper-case J, the lower-case d is used.
Output: 2007-February-6th
Uppercase M indicates the three abbreviated characters of the month, while uppercase F indicates the full English Writing of the month. (No lower case f)
Uppercase S indicates the suffix of a date, such as "st", "nd", "rd", and "th". For details, see the date number.
Summary:
Y indicates that the year can be in uppercase or lowercase y;
Indicates that the month can be written in uppercase letters (F), uppercase letters (M), lowercase letters (m), and lowercase letters (n );
Indicates the date suffix.
The following describes the meaning of the time parameter (hour: minute: Second ):
By default, PHP interprets the display time as "Greenwich Mean Time", which is 8 hours different from our local time.
Output: 5: 56: 57 am
Output: 05: 56: 57 AM
Lowercase g indicates the 12-hour system, with no leading 0, while lowercase h indicates the 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 ".
Output: 8: 02: 26
Output: 08: 02: 26
Uppercase G indicates the number of hours in the 24-hour format, but does not contain the leading value. uppercase H indicates the number of hours in the 24-hour format.
Original article address: WordPress the_time function time format summary, thanks to the original author for sharing.