Custom JSP taglib. This taglib lets you calculate time intervals.
For example:
Two parameters (from and to) describe your dates. You may use
here java.uti.Date, java.util.Calendar or just a simple string in format
dd/mm/yyyy where dd describes a day, mm describes a month and
yyyy describes a year. You can calculate intervals in minutes, hours, days or
workdays (days excluding Sunday and Saturday). Parameter unit describes
how to calculate this interval. E.g.:
Tags are:
timeInterval
Calculates time interval between two dates. Parameters are:
1) from Describes a 'from' date
2) to Describes a 'to' date
3) unit Optional parameter. Describes an unit
for time interval. Possible values are min, hour, day,
workday, full. Default value is day.
4) id Optional parameter. Describes a page
scope variable for result (type is java.lang.String). Without this
parameter tag just prints data.
for downloading:
Library: tdifftag.jar Description: taglib.tld
See also Coldtags suite - the largest collection of custom JSP tags.