Sun Java System Portal Server Mobile Access 7.1 Tag Library Reference

dateroll

Description

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.

Tag Body

JSP

Restrictions

None.

Attributes

The tag has the following attributes for which the Required value is “No”:

name

Specifies the datetime bean to operate on. If not specified then search for a datetime parent tag.

field

Specifies the java.util.Calendar field of the roll; defaults to DATE.

amount

Specifies the amount of the roll; an integer value, defaults to "1". Positive values roll forward; negative values roll backward.

Properties

None.

Example(s)
<%-- 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"/>