Custom JSP taglib lets you advance to or subtract from a given date. For example:
<%@ taglib uri="taglib.tld" prefix="d" %> <!-- 2 days from now --> <d:DateAdd>2</d:DateAdd> <!-- 3 years ago --> <d:DateAdd unit="y">-3</d:DateAdd> Here tag treats own body as an integer value for days (years, hours, minutes, seconds) depends on the parameter unit and add to (or subtract from for the negative value) this value to (from) the given time. Tags are: DateAdd Body tag lets you advance to or subtract from a given date. 1) id Optional parameter. Describes a name for page scope
variable (type is java.util.Date) for a new date. Without this parameter tag just prints data.
for downloading: Library: dateaddtag.jar Description: taglib.tld See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|