Is there a JavaScript library that provides the functionality of an object with a time difference?
For example, let's say I have:
time1 = Date(...) time2 = Date(...) timeDelta = time2 - time2
By default, it just gives me milliseconds that I can work with, but it would be nice to have something available already, so I don't need to reinvent the wheel. What I'm shooting is something like this:
timeDelta.hours // would give the number of hours between time2 and time1 time1 + timeDelta // would equal time2
Any suggestions?
Thanks,
source share