evanisnor / durationjs

A JavaScript library for parsing and manipulating ISO 8601 formatted duration strings.
MIT License
13 stars 6 forks source link

Allow for timezone designators #8

Open desimone opened 11 years ago

evanisnor commented 11 years ago

Timezones are relevant? Duration is relative.

desimone commented 11 years ago

Right ! But imagine how useful it would be to compare the duration of two events given timezone. For example, use my airplane use case.. what if you don't know the duration of the flight, only arrival and departure time?

On Wed, Mar 20, 2013 at 11:19 AM, leadhead9 notifications@github.comwrote:

Timezones are relevant? Duration is relative.

— Reply to this email directly or view it on GitHubhttps://github.com/leadhead9/durationjs/issues/8#issuecomment-15182003 .

evanisnor commented 11 years ago

Yeah I've been thinking about adding support for actual time data. That means supporting ISO 8601 in its entirety. Lots of work.

It sounds like it could be fun to implement, though. Maybe :)

desimone commented 11 years ago

Having a small dependency would not be killer.

evanisnor commented 11 years ago

a small dependency on what?

billinghamj commented 8 years ago

All of this is supported by Moment.js/Moment Timezone. You could just use that, keeping this library very simple: http://momentjs.com/docs/#/durations/