Custom JSP taglib. This taglib lets you calculate time intervals.
For example:
<%@ taglib uri="taglib.tld" prefix="get" %> <% String s1="01/08/2002"; String s2="07/09/2002"; %> <get:timeInterval from="<%=s1%>" to="<%=s2%>" unit="day"/> 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.:
<% String lastDay="31/12/2009"; %> Time left till New Year is: <get:timeInterval to="<%=lastDay%>" /> days Tags are: timeInterval Calculates time interval between two dates. Parameters are: 1) from Optional paramter. Describes a 'from' date. By default is a current date.
for downloading: Library: tdifftag.jar Description: taglib.tld See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|