I don’t have a comparison but I used moment, dayjs, luxon. Here’s my impressions:
- Moment.js - moment is powerful. It supports parsing/formatting dates in various formats and languages. You also got APIs to manipulate dates. Moment is designed with OOP APIs so it looks very nice in JavaScript.
- date-fns - we want functional programming! So we provided functions to offer those features.
- Luxon - I(that author @icambron) maintained moment.js and I think we can design a better library by: making dates immutable, better time zone, better API names, etc.
- Dayjs - we want a light-weight and immutable version of moment.js while we don’t want to learn a new library. Let’s just do it with moment.js APIs.