0
具体星期几
我目前使用下面的代码显示在2012年11月30日一些内容显示的内容:JSTL - 上
<jsp:useBean id="now" class="java.util.Date"/>
<fmt:formatDate var="currentDate" value="${now}" pattern="yyyy.MM.dd" />
<%
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("HHmmss");
String a = sdf.format(new java.util.Date());
%>
<c:if test='${currentDate ge "2012.11.26" && currentDate le "2012.11.30"}'>It is the 30th of November 2012</c:if>
有没有一种方法可以让我用一周的某一天这样做,例如每个星期一会显示一段宣传文字,这会在本周的其余时间消失?另外,如果我添加下面的代码,我可以看到它打印下面的'星期一11月14日14:54:33 GMT 2013'。
<c:out value="${now}" />
谢谢。