Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to call the DedeCMS time tag pubdate

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the DedeCMS time tag pubdate how to call, has a certain reference value, friends in need can refer to. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

How do I call the DedeCMS time tag pubdate?

Generally speaking, when we use a dream weaving station as a template, we will need to use a variety of time display formats, but there are many time display formats, and many people do not know how to use them. Today, darren will explain the time tag of dream weaving in detail and share some application tips to you.

First, take a look at the composition of the time tag of the dedecms default template:

[field:pubdate function= "MyDate ('mmurdhi dongjie)" /]

First of all, the field:pubdate tag is the document release time call tag of the underlying dream template, and the latter function represents the reformatting of the time format. From this we know that m and d show month and day respectively. In fact, the function of the dede time tag is also very powerful, not only the year, month and day, but also the day of the week and the minute and second of the time, so what are their labels? The following is an explanation (it should be noted that versions prior to 5.3 should be added%):

An abbreviation of the day of the week.

The full name of the day of the week.

The abbreviation of the name of month b.

The full name of month B.

C local date time is a better representation of a string.

D use numbers to indicate the day of the month (range 00 to 31).

H represents hours with a 24-hour number (range from 00 to 23).

I use a 12-hour number to represent the number of hours (range 01 to 12).

J represents the day of the year in numbers (range 001 to 366).

M month figures (range from 1 to 12).

M minutes.

P represents the local time as' AM' or 'PM'.

S seconds.

The U number is expressed as the week ordinal of the year, with the first week beginning on the first Sunday.

The W number represents the week ordinal of the year, with the first week beginning on the first Monday.

W uses numbers to indicate the day of the week (0 is Sunday).

X does not contain the date representation of time.

X does not contain the time representation of the date.

Y two digits represent the year (range from 00 to 99).

Y the complete number of the year, that is, four digits.

Z time zone or acronym.

Here are some commonly used time call formats, which you can refer to:

[field:pubdate function='strftime ("Y-m-d H:M:S", @ me)'/]

Time display style: 2013-12-25 11:11:52

[field:pubdate function='strftime ("y-m-d H:M:S", @ me)'/]

Time display style: 13-12-25 11:11:52

[field:pubdate function='strftime ("Mmurd H:M:S", @ me)'/]

Time display style: 12-25 11:14:20

[field:pubdate function='strftime ("mmurd H M", @ me)'/]

Time display style: 12-25 11:14

[field:pubdate function='strftime ("y-m-d", @ me)'/]

Time display style: 13-12-25

[field:pubdate function='strftime ("m, d, y", @ me)'/]

Time display style: December 25, 13

[field:pubdate function='strftime ("m / d / Y / H / M: s / s", @ me)'/]

Time display style: 11:17:36 on December 25, 2013

[field:pubdate function='strftime ("bd, Y", @ me)'/]

Time display style: Nov 25, 2013

[field:pubdate function='strftime ("An on bd, Y, X: Z", @ me)'/]

Time display style: Saturday on Nov 25, 2013, 11:21:06: China Standard time

Thank you for reading this article carefully. I hope it is helpful for everyone to share the content of DedeCMS time tag pubdate. At the same time, I also hope you can support us, pay attention to the industry information channel, and find out if you have any problems. Detailed solutions are waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report