3 ms·
The inevitable cycle of these datetime libraries: Moment.js was originally a lightweight date parsing system that got big because of all the locales and extende
by manigandham 9y ago
The inevitable cycle of these datetime libraries: Moment.js was originally a lightweight date parsing system that got big because of all the locales and extended functionality. If you need it, it's the only one that does it well and there's no easy way to make that smaller.
A common lighter alternative though is date-fns: https://date-fns.org/ https://date-fns.org/ which reuses the native Datetime object and is architected with ES6 modules for tree-shaking so you can include only what you need.
- kitten_mittens_ 9y agoIf you’re using a bundler, it’s not that hard to remove extra locales. Functionality on the other hand...