JavaScript Library
Quick reference for all kinds of tasks.
Datetime
JavaScript have native Date
object, as well as experimental Temporal
object.
Checkout the cookbook and MDN. You can polyfill them today with:
Other more humanize features are provided in third-party library:
- iamkun/dayjs (0): Super tiny Moment.js drop-in replacement, the modern go-to option.
- moment/moment (0): The OG. Full features, widely-used, but in maintainence mode.
- moment/luxon (0): The modern reboot of Moment.js.
- date-fns/date-fns (0): Native-focus, good for proejct that do not used much humanize feature and looking to adopt Temporal in the future.