icambron / twix.js

:hourglass::left_right_arrow: A date range plugin for moment.js
https://isaaccambron.com/twix.js/
MIT License
379 stars 54 forks source link

Include UTC offset in time range #93

Closed sebgrohn closed 7 years ago

sebgrohn commented 7 years ago

Hi!

Thank you for this library; it really helps us in formatting date/time ranges.

In our application, we both show ranges in local time (browser/OS dependent) and UTC time, and I would love to have an option to include the UTC offset (+-HH:MM) in the formatted string as well. As the offset can be different between the start and end of the range (when spanning over one of the daylight saving time shift), I think there is a reason to include this functionality in Twix rather than just suffixing it myself.

What do you think about this? :)

icambron commented 7 years ago

I assume you mean for the smart formatter. Yeah, I think that's a reasonable feature request. I'd take a PR that looks like this:

sebgrohn commented 7 years ago

Yes, I was talking about the smart formatter. I would gladly write a PR for this feature. I can't promise any time plan for it, however. I will do it when I get time. Feel free to close this issue in the meantime if it clutters the list. ^_^