May 15, 2009 樣式
[field:pubdate function='strftime("%m-%d",@me)'/]
12-17
[field:pubdate function='strftime("%m-%d",@me)'/]
2009-12-27 18:30:02 樣式
[field:pubdate function="GetDateTimeMK(@me)"/]
2009-12-27 樣式
[field:pubdate function="GetDateMK(@me)"/]
12-27
[field:pubdate function='strftime("%m-%d",@me)'/]
2009
[field:pubdate function='strftime("%Y",@me)'/]
2009-12-27 樣式
{dede:field name='pubdate' function='GetDateMk(@me)'/}
May 15, 2009 樣式
{dede:field name='pubdate' function='strftime("%b %d, %Y",@me)'/}
24小時(shí)內(nèi)的時(shí)間顯示紅色:
[field:pubdate runphp='yes']
$a="";";
$b="
$c=strftime("%Y年%m月%d日 %H:%M:%S","@me");
$ntime = time();
$oneday = 3600 * 24;
if(($ntime - @me)<$oneday) @me = $a.$c.$b;
else @me =$c;
[/field:pubdate]
最后更新時(shí)間
{dede:tagname runphp='yes'}@me = date("Y-m-d H:i:s", time());{/dede:tagname}
XX天前
[field:pubdate runphp='yes']
$today = Floor(time()/(3600 * 24));
$senday= Floor(@me/(3600 * 24));
$updays = $today-$senday;
if($updays==0) @me = "今日";
else @me = $updays."天前";
[/field:pubdate]