This project is archived and is in readonly mode.

#507 open
dfghi

Date.Extras timeDiff improvement.

Reported by dfghi | February 3rd, 2011 @ 03:10 PM | in 1.4.0.1 (closed)

This ticket was originally posted as:
https://mootools.lighthouseapp.com/projects/2706/tickets/1164-datee...

Sorry for the inconvenience, I didn't see there was a separate tracker for more :-)

Given that the original problem is solved, there should be a little improvement to the timeDiff method of Date.Extras. It would be nice to have the possibility to set the "durations" array/object (I don't know which is the current form).
Sometimes you may need to compute the counter string up to the minute, and sometimes not. For example, I may want a timer that says 30s:200m, or another with 30s:8m:22h:37d (maybe without the year).
Proposed change is to either have:
timeDiff: function(to, joiner, durations) of something simpler that just states the topmost element in durations:
timeDiff: function(to, joiner, "hour")

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

People watching this ticket

Pages