Is there a JavaScript library that would provide functionality of a "time difference" object?
For example, let's say I have:
time1 = Date(...)
time2 = Date(...)
timeDelta = time2 - time2
By default that just gives me milliseconds, which I can work with, but it would be nice to already have something available so I dont have to re-invent the wheel. What I'm shooting for is something like this:
timeDelta.hours // would give the number of hours between time2 and time1
time1 + timeDelta // would equal time2
Any suggestions?
Thanks,
Necro Post!
http://momentjs.com/
You're welcome. :P
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With