Open GoogleCodeExporter opened 8 years ago
This would be a very useful feature.
Original comment by Steve.J....@gmail.com
on 13 Aug 2010 at 10:38
this would be a very very useful feature!
Original comment by brad.p...@gmail.com
on 10 May 2012 at 6:11
[deleted comment]
Moment.js have this feature called "humanize"
Regards !
Original comment by nokioxt...@gmail.com
on 12 Aug 2012 at 6:07
As far as I can see, moment.js humanize() only returns an approximate answer.
For example, today "moment([2012,8,24,2,12,36]).from(moment([2012,1,1]))" says
"in 8 months" where as I would want "8 months, 24 days, 2 hours, 12 minutes and
36 seconds". (Actually there's a timezone correction as well, as we're
currently in summer time, but I wouldn't be bothered if that was ignored...)
Actually, the docs also state: "The length of a duration in months is defined
as 30 days". That's *not* what I want :-(
Otherwise, it's a nice library - thanks for pointing it out.
Original comment by p.f.mo...@gmail.com
on 24 Aug 2012 at 9:07
This is in DateJS as TimePeriod. You just pass it two dates and it returns an
object with all the things you just asked for.
It's in the SVN but it's actively maintained in my fork (I actually *just*
fixed a small bug with it too) here: https://github.com/abritinthebay/datejs/
Original comment by darkcr...@gmail.com
on 16 Sep 2013 at 7:18
Original issue reported on code.google.com by
p.f.mo...@gmail.com
on 5 Sep 2009 at 7:55