DEDE时间格式汇总
来源:互联网 发布:caxa数控车床编程软件 编辑:程序博客网 时间:2024/06/06 16:45
时间格式
{dede:field name='pubdate' function='strftime("%Y年%m月%d日 %H:%M:%S","@me")' /}2007年1月1日 18:30:02
{dede:field name='pubdate' function='strftime("%Y-%m-%d %H:%M:%S","@me")' /}2007-1-1 18:30:02
{dede:field name='pubdate' function='strftime("%Y年%m月%d日 %H时%M分%S秒","@me")' /}2007年1月1日 18时30分02秒
{dede:field name='pubdate' function='strftime("%m-%d %H:%M:%S","@me")' /}1-1 18:30:02
{dede:field name='pubdate' function='strftime("%m-%d","@me")' /}1-1
%Y-年
%m-月
%d-日
%H-小时
%M-分
%S-秒
24小时内的时间显示红色..
[field:pubdate runphp='yes']
$a="<font color='#ff0000'>";
$b="</font>";
$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]
最后更新时间
最后更新时间:{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]
{dede:field name='pubdate' function='strftime("%Y年%m月%d日 %H:%M:%S","@me")' /}2007年1月1日 18:30:02
{dede:field name='pubdate' function='strftime("%Y-%m-%d %H:%M:%S","@me")' /}2007-1-1 18:30:02
{dede:field name='pubdate' function='strftime("%Y年%m月%d日 %H时%M分%S秒","@me")' /}2007年1月1日 18时30分02秒
{dede:field name='pubdate' function='strftime("%m-%d %H:%M:%S","@me")' /}1-1 18:30:02
{dede:field name='pubdate' function='strftime("%m-%d","@me")' /}1-1
%Y-年
%m-月
%d-日
%H-小时
%M-分
%S-秒
24小时内的时间显示红色..
[field:pubdate runphp='yes']
$a="<font color='#ff0000'>";
$b="</font>";
$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]
最后更新时间
最后更新时间:{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]
1 0
- DEDE时间格式汇总
- dede时间格式调用标签
- dede 时间调用标签格式大全
- dede获取时间日期格式代码大全
- dede 时间调用标签格式大全
- Dedecms 时间格式汇总
- Web_PHP_时间格式汇总;
- DedeCMS时间格式汇总
- SQL Server时间格式汇总
- Sql 日期时间格式转换汇总
- 织梦DedeCms时间格式调用汇总
- 【dede】织梦建站汇总
- dede时间调用标签
- sharepoint 2010 关于sharepoint时间格式常见问题汇总
- 时间DateTime类型转换为字符串String格式方法汇总
- PHP获取当前时间、时间戳的各种格式写法汇总[日期时间]
- PHP获取当前时间、时间戳的各种格式写法汇总[日期时间]
- PHP获取当前时间、时间戳的各种格式写法汇总[日期时间]
- 安装sqlyog和使用注册码
- 系统启动时,spring配置文件解析失败,报”cvc-elt.1: 找不到元素 'beans' 的声明“异常
- 正则表达式
- Altium Designer经验
- C++学习(八)——函数探幽
- DEDE时间格式汇总
- XML
- python下编译py成pyc和pyo
- 线段树 hdu5700 区间交
- Caffe中卷基层和全连接层训练参数个数如何确定
- 杂论--更充分地,想尽一切办法地把群众的监督作用发挥出来
- Construct Binary Tree from Preorder and Inorder Traversal (medium)
- JavaScript 加号操作符细节
- 面向对象设计原则