Date and time library for dealing with schedules.
Features:
- Supports dates, times, time stamps, and active weekdays
- Time zone required for operations only when relevant
- Serializable to simple ISO formatted strings
This package has the following dependencies:
date-fns-tz
: used for time zone calculationsdate-fns
: it is a peer dependency ofdate-fns-tz
@date-fns/utc
: used for itsUTCDateMini
implementation that simplifies some of the time calculations
A subset of ISO 8601 is used as the valid format for SDate, STime, and STimestamp. This was done because:
- the format is human readable
- the values are easily sortable as strings
- the values are easily comparable as strings
The library was designed with schedules in mind that do not require second or smaller granularity as such STime and STimestamp only provide minute granularity.
For a list of valid time zones run Intl.supportedValuesOf('timeZone')
in your environment.
See docs