struts标签判断日期是否过期
程序员文章站
2022-06-29 12:08:24
...
<s:set name="nowTime" value="new java.util.Date()" /> <s:iterator var="row" value="list" > <div id="div_keyword_${row.keyWordId}"> <div class="demo4_t"></div> <div class="demo4_c"> <div class="listdl2"> <div class="listdltitl2 fl"> <a href="javascript:oneshowkey('${row.keyword}');">${row.keyword}</a> </div> <div class="fr ltdttxt2"> 匹配度 </div> <div class="cl"></div> <dl class="fl"> <dt class="dttxt"> 时间来源: </dt> <s:if test="#row.status == 'active'"> <s:if test="#row.effectiveEnd.getTime() <= #nowTime.getTime()"> <dd id="ddtxt2_${row.keyWordId}" class="ddtxt2" > 过期 </dd> </s:if> <s:else> <dd id="ddtxt2_${row.keyWordId}" class="ddtxt2" style="width: auto;" > ${row.effectiveStart} ~ ${row.effectiveEnd} </dd> </s:else> </s:if>
上一篇: struts+json所含的jar包全集
下一篇: JAVA比较两个日期的差值天数