Duration taglib ver. 1.2

    Custom JSP taglib lets you get duration in milliseconds and display it in the human readable form like hours:minutes:seconds. For example:
 


<%@ taglib uri="taglib.tld" prefix="d" %>

<d:duration id="A">1234567</d:duration>

Time is: <%=A%>

<d:duration value="123456"/>

Tags are:

duration

Body tag lets you get duration in milliseconds and display it in hours:minutes:seconds form. Parameters are:

1) value Optional parameter. Presents a value in milliseconds
2) format Optional parameter. Describes a format for the output. Possible values are: 1 - hours only, 2 - hours and minutes, 3 - hours, minutes and seconds. Default value is 3 (full format).
3) id Optional parameter. Describes a name for the page scope variable (type is java.lang.String) that will keep a result. Without this parameter tag simply prints data.

for downloading:

Library: durationtag.jar    Description: taglib.tld

© Coldbeans      Comments?

See also Coldtags suite - the largest collection of custom JSP tags.

Also in Coldtags: