breejs / later

*Maintained fork of Later.* A javascript library for defining recurring schedules and calculating future (or past) occurrences for them. Includes support for using English phrases and Cron schedules. Works in Node and in the browser.
https://breejs.github.io/later/
MIT License
134 stars 13 forks source link

Timezone Support? #9

Open lordson-ajira opened 3 years ago

lordson-ajira commented 3 years ago

TL;DR Would adding timezone support - esp. IANA timezones with DST - without external dependencies - be a worthwhile effort in this library? If not, would it be possible to add hooks, so that some other library *cough* luxon/moment-tz *cough* could do the timezone+DST specific heavy lifting and later could just make use of the Date objects provided by it

Current State

From what I see of the code, later currently supports UTC or the server's local timezone alone

Use Case

I'm writing a small service which gets reminder/schedule from users who could potentially be in different time zones. later fits all my requirements (lightweight, human-readable schedule parsing) except for the timezone part. I'll anyways be using later as timezone support isn't a deal-breaker, but might be easier if atleast some hooks were provided so that it would be possible to "opt-in" for timezone support without having to fork the code.

Considerations

I wouldn't want to support timezones in later itself if its only possible by adding dependencies, because no dependencies is a really good selling point for this library