dede time stamp

Home time label dedecms:
1,12-27 pattern
([field: pubdate function = 'the strftime ( "% D% M-", @ Me)' /]) 

2, On May 15, 2009 style
([field: pubdate function = 'strftime ( "% b% d ,% Y", @ me)' /])
Note: the code can be modified after the run!


dedecms Page timestamp:
1,2009-12-27 18:30:02 Style
[Field: pubDate function = "GetDateTimeMK (@me)" /] 

2,2009-12-27 pattern
[field: pubdate function = "GetDateMK (@me) "/]

dedecms content page timestamp:
1,2009-12-27 style
{dede: field name = 'pubdate ' function = 'GetDateMk (@me)' /}


2, May 15, 2009 style
{dede: field name = 'pubdate  ' function = 'strftime ( "% b% d,% Y", @ me)' /}

time within 24 hours of red:
[Field: pubDate runphp = 'Yes']
$ A = ""; ";
$ B ="
$ C = the strftime ( "% the Y in% m month% d day% H:% m:% S", "@ Me");
$ ntime Time = ();
$ OneDay = 3600 * 24;
IF (($ ntime - @me) <$ OneDay) @me = $ A $ B $ C;..
the else @me = $ C;
[/ Field: pubDate] 

last updated
{Dede: Tagname runphp = 'Yes'} @ Me = DATE ( "Ymd H: I: S", time ()); {/ Dede: Tagname}


XX days ago
[field: pubdate runphp = 'yes ' ]
$ Today = Floor (Time () / (3600 * 24));
$ senday = Floor (Me @ / (3600 * 24));
$ updays TODAY- = $ $ senday;
IF ($ updays == 0) @ me = "today";
else @me = $updays."天前";
[/field:pubdate] 

Using strftime () function formatted time:
abbreviated% a weekday

% A week's full name

% b abbreviated month of the
full name of the month% B of
the date and time of the standard string% c
% C last two digits of the year of
the first few days of each month decimal representation of% d
% D month / day / year
% e in the two-character domain, the decimal representation of the first few days of the month
% F Year - month - day
two digits of the year% g, based on weeks of
% G Year, based week of
the month abbreviated name% h
% h H 24-hour clock
hour% I 12 hour of
the annual day of% j in decimal notation
month decimal notation% m
% m ten o'clock represented minutes manufactured
% n newline
% p local AM or PM display equivalent
% r 12 hours
% R displays the hours and minutes: mm: HH
% S decimal seconds
% t horizontal tab
when the display every minute% T: HH: mm: SS
% weekly first few U day, Monday is the first day (value from 0-6, Monday is 0)
% U week number of the year, the Sunday as the first day (value from 0 to 53)
% V week number of year , based week in
week% w decimal representation of a few (value from 0-6, Sunday is 0)
% W week number of year, Monday as the first day (value from 0 to 53)
% the X-standard date string
% X standard time series
% y without Ji decimal year (values from 0 to 99) as 17
% Y system with ten years as part of the century, 2017
% Z,% Z time zone name, the name of a time zone can not be obtained if the space character is returned.

Guess you like

Origin www.cnblogs.com/sjzgk/p/11781262.html
Recommended