Sun Java System Portal Server Mobile Access 7.1 Tag Library Reference

datetime

Description

The datetime tag makes the specified date/time bean properties available.

Tag Body

JSP

Restrictions

Only one of the id or name attributes should be used at a time. The datetime properties are only valid from the start tag to the end tag.

Attributes

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

id

Specifies the id of the bean to create.

name

Specifies the name of the bean to use.

Properties

The tag provides the following bean properties for which the Type value is “Integer” and Access value is “Get/Set”:

hours

Hours of the time; in a 24 hour clock

minutes

Minutes of the time.

seconds

Seconds of the time.

day

Day of the date.

month

Month of the date.

year

Year of the date; a 4 digit year.

Example(s)
<%-- create a 'now' datetime at the current time --%>
<cal:datetime id="now"/>

<%-- create a 'start' datetime with today at 10:30 --%>
<cal:datetime id="start">
	<cal:set property="hours" value="10"/>
	<cal:set property="minutes" value="30"/>
</cal:datetime>

<%-- use a previously created datetime --%>
<cal:datetime name="now">
		Day   = <cal:get property="day"/>
		Month = <cal:get property="month"/>
		Year  = <cal:get property="year"/>
</cal:datetime>