*Freemarker日期格式化处理
基本参数:
date: 只显示日期,不显示时间.
如
createTime?date或
{createTime?date(‘yyyy-MM-dd’)}
time: 只显示时间,不显示日期
如
createTime?time或
{createTime?time(‘hh:mm:ss’)}
datetime: 时间和日期同时显示
如
createTime或
{createTime?datetime(‘yyyy-MM-dd hh:mm:ss’)}或
createTime?string(‘yyyy−MM−ddhh:mm:ss′)Freemarker预置了一些日期格式
{createTime?string.short} 01:45 PM
createTime?string.medium01:45:09PM
{createTime?string.long} 01:45:09 PM PST
createTime?string.full01:45:09PMPST
{createTime?string.xs} 13:45:09-08:00
createTime?string.iso13:45:09−08:00字符串类型:日期格式:
{book.date?string(‘yyyy-MM-dd’)}*
Freemarker(ftl)时间格式化
最新推荐文章于 2021-10-08 16:45:17 发布