Commonly used Dedecms weave dream label, build station colleagues may often be troubled by the time format, many people still stay in the use of a cattle webmaster writing super tags to get the time of the wording. Here, give you a detailed explanation of Dede's time tag, and share some of the app's tips for everyone.
First look at the composition of the Dede default template's Time label : http://www.26shouji.com/
[Field:pubdate function= "mydate (' m-d ', @me)"/]
The first is to declare that Field:pubdate is the release time label for the underlying template, and the function on the back side represents the reformatting of the time format.
From here we know that the difference between M and D is month and day. In fact, the function of the Dede time tag is also very powerful, not only can represent the day of the month, but also the days and minutes and seconds, then what is their label? Here are the corresponding tags (note that the previous version of 5.3 is used with%):
—————————————————————————————————————————————————
Abbreviation of a week.
The full name of a week.
Abbreviation for B month name.
Full name of month B.
c The local end date time is a better representation of the string.
D uses numbers to indicate the day of the month (range 00 to 31).
H represents the number of hours in 24-hour numbers (ranges from 00 to 23).
I use a 12-hour number to denote the number of hours (ranging from 01 to 12).
J numbers indicate the day of the Year (range 001 to 366).
Number of M months (range from 1 to 12).
M minutes.
P indicates the local time with ' AM ' or ' PM '.
S number of seconds.
The U number is expressed as the week of the current year, and the first one weeks start in Sunday.
The W number is expressed as the week of the current year, and the first one weeks start in Monday.
W uses numbers to indicate the day of the week (0 is Sunday).
X does not include a date representation of the time.
X does not include a time representation of the date.
Y two digits represent the year (range from 00 to 99).
Y represents the full year number, which is the four-digit number.
Z time zone or name abbreviation.
—————————————————————————————————————————————————
Here are some common time call formats for your reference:
[Field:pubdate function= ' strftime ("%y-%m-%d%h:%m:%s", @me) '/]
2008-11-01 11:11:52
[Field:pubdate function= ' strftime ("%y-%m-%d%h:%m:%s", @me) '/]
08-11-01 11:11:52
[Field:pubdate function= ' strftime ("%m-%d%h:%m:%s", @me) '/]
11-01 11:14:20
[Field:pubdate function= ' strftime ("%m-%d%h:%m", @me) '/]
11-01 11:14
[Field:pubdate function= ' strftime ("%y-%m-%d", @me) '/]
08-11-01
[Field:pubdate function= ' strftime ("%y year%m month%d Day", @me) '/]
November 01, 08
[Field:pubdate function= ' strftime ("%y years%m month%d days%h points%m minutes%s seconds", @me) '/]
November 01, 2008 11:17 36 seconds
[Field:pubdate function= ' strftime ("%b%d,%Y", @me) '/]
Nov 01, 2008
[Field:pubdate function= ' strftime ("%A on%b%d,%Y,%x:%Z", @me) '/]
Saturday on Nov 01, 2008, 11:21:06: China Standard Time
Dede weave Dream CMS time tag call set sponge