JSTL 计算时间差
System.currentTimeMillis() long value
<c:if test="${((currentTime-c.commentDatetime.time)/1000/60/60)>=1}">
<fmt:formatNumber value="${((currentTime-c.commentDatetime.time)/1000/60/60)}" pattern="#0" /> 小时前
</c:if>
<c:if test="${((currentTime-c.commentDatetime.time)/1000/60/60)<1}">
<fmt:formatNumber value="${((currentTime-c.commentDatetime.time)/1000/60)}" pattern="#0" /> 分钟前
</c:if>
JSTL 计算时间差
最新推荐文章于 2017-12-26 16:15:14 发布