zoukankan      html  css  js  c++  java
  • dedecms 时间标签strftime和MyDate

     先说下内容页样式:
    
    日期:{field:pubdate function=strftime('m-d',@me)/} 01-01
    
    日期:{field:pubdate function=strftime('m月d日',@me)/} 01月01日
    
    日期:{field:pubdate function=strftime('d日',@me)/} 01日
    
    日期:{field:pubdate function=strftime('Y-m-d',@me)/} 2012-01-01
    
    日期:{field:pubdate function=strftime('y-m-d',@me)/} 12-01-01

    日期:[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("%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 : 中国标准时间
    那列表页和主页的样式就需要转换一下了!修改成如下: 日期:[field:pubdate function="MyDate('m-d',@me)"/] 01-01 日期:[field:pubdate function="MyDate('m月d日',@me)"/]  01月01日 日期:[field:pubdate function="MyDate('d日',@me)"/] 01日 日期:[field:pubdate function="MyDate('Y-m-d',@me)"/] 2012-01-01 日期:[field:pubdate function="MyDate('y-m-d',@me)"/] 12-01-01

    下面 举一个例子:

    <span class="date">[field:pubdate function="MyDate('d',@me)"/]<u>[field:pubdate function='strftime("%b",@me)'/]</u></span>

     效果如图所示: 

  • 相关阅读:
    java常见面试题汇总(一)
    我的自学之路:java学习路线图分享
    bzoj3714 [PA2014]Kuglarz
    cf478D Red-Green Towers
    cf478C Table Decorations
    cf478B Random Teams
    cf479A Expression
    cf479C Exams
    cf479D Long Jumps
    cf479E Riding in a Lift
  • 原文地址:https://www.cnblogs.com/wishjm/p/5828353.html
Copyright © 2011-2022 走看看