其中${now}代表当前日期;${trainDate} 则是后台回传的日期。将日期进行格式化话后进行对比。
详细参考:http://www.runoob.com/jsp/jstl-format-formatdate-tag.html
<fmt:formatDate value="${now}" type="both" dateStyle="long" pattern="yyyy-MM-dd" var="nowDate"/>
<fmt:formatDate value="${process.finishDate}" type="both" dateStyle="long" pattern="yyyy-MM-dd" var="trainDate"/>
<c:if test="${process.finishDate eq null}">
<span style="width:80px">无日期限制</span>
</c:if>
<c:if test="${trainDate lt nowDate}">
<span style="color:red;width:80px">已超期</span>
</c:if>
<c:if test="${process.finishDate ne null && trainDate ge nowDate}">
<span>
<fmt:formatDate pattern="yyyy-MM-dd" value="${process.finishDate }"/>
</span>
</c:if>