The dateroll tag rolls the specified datetime bean. If an error occurs during processing, the tag body will be evaluated and the remainder of the page will be skipped.
JSP
None.
The tag has the following attributes for which the Required value is “No”:
Specifies the datetime bean to operate on. If not specified then search for a datetime parent tag.
Specifies the java.util.Calendar field of the roll; defaults to DATE.
Specifies the amount of the roll; an integer value, defaults to "1". Positive values roll forward; negative values roll backward.
None.
<%-- roll forward one day from today --%> <cal:datetime id="now"/> <cal:dateroll name="now"/> <%-- roll forward 2 weeks --%> <cal:datetime id="now"/> <cal:dateroll name="now" amount="2" field="WEEK_OF_YEAR"/> <%-- roll back 5 hours --%> <cal:datetime id="now"/> <cal:dateroll name="now" amount="-5" field="HOUR"/>