DateTime is a lightweight and performant date and time library with iana timezones support.
DateTime does not use native Date object. Instead it uses pre-parsed IANA Time Zone Database directly from JavaScript. That allows to keep it predictable, reliable, and future proof on any platform.
- Supports ISO-8601 standard, including intervals and durations
- Supports timezones and DST
- Works in any browser on any platform independently from the native Date
- Very fast
- Small size – only 10 KB compressed
- No dependencies
- 99% covered with unit tests
Coming soon.
DateTime is much faster than any other library with timezones support:
Create a new instance with an array
==================================================================
DateTime × 782,154 ops/sec
MomentJS × 260,938 ops/sec
MomentJS + Timezones × 49,593 ops/sec
Fastest is DateTime
Create a new instance with a string
==================================================================
DateTime × 383,795 ops/sec
MomentJS × 34,681 ops/sec
MomentJS with timezones × 20,491 ops/sec
js-joda with timezones × 20,153 ops/sec
Fastest is DateTime
Create a new instance with a string and format
==================================================================
DateTime × 504,000 ops/sec
MomentJS × 38,349 ops/sec
MomentJS + Timezones × 21,643 ops/sec
Fastest is DateTime
Check datetime-benchmark for details.
MIT