使用date_format进行日期格式化,前提要转换的日期是整型时间戳,如果不是需要先strtotime
$smarty = new smarty; $smarty->assign('yesterday', strtotime('-1 day')); $smarty->display('index.tpl'); index.tpl: {$smarty.now|date_format} {$smarty.now|date_format:"%a, %b %e, %y"} {$smarty.now|date_format:"%h:%m:%s"} {$yesterday|date_format} {$yesterday|date_format:"%a, %b %e, %y"} {$yesterday|date_format:"%h:%m:%s"}
Hadoop|
Apache Pig|
Apache Kafka|
Apache Storm|
Impala|
Zookeeper|
SAS|
TensorFlow|
人工智能基础|
Apache Kylin|
Openstack|
Flink|
MapReduce|
大数据|
云计算|
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....