History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LOOM-140
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Ignacio Coloma
Reporter: Ignacio Coloma
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Loom

Format a time duration in a humanized form, both server and client-side

Created: 22/Jan/09 09:30 PM   Updated: 06/Feb/09 07:21 PM
Component/s: Loom JSP tags, Loom Javascript
Affects Version/s: None
Fix Version/s: 1.1


 Description  « Hide
A way to render an elapsed period of time in humanized form. The proposed API is:

Javascript:

var date1;
var date2;

// a field with days, hours, minutes and seconds
var duration = (date1.getTime() - date2.getTime()).toDuration();

// a string with the humanized representation of this duration object ("2 days 3 minutes")
duration.humanized()

JSP:

<l:formatDuration value="${durationInMillis}"/>

 All   Comments   Change History      Sort Order:
Ignacio Coloma - 06/Feb/09 07:19 PM
Reopened to add server-side