Live data from Hacker News

Day.js – Fast 2kB alternative to Moment.js with the same modern API

day.js.org

1–10 of 141 posts

Re: Day.js – Fast 2kB alternative to Moment.js with the same modern API

#4
post #3

Why is this good/better compared to date-fns?

Smaller bundle size, similarity to moment.js

As a dev who’s used all three, is there a massive difference? Not really. Stick with what you like (though moment is no longer maintained so maybe not that)

Re: Day.js – Fast 2kB alternative to Moment.js with the same modern API

#9

It's embarrassing we never evolved the date api which comes with the browser. That said, I tend to err on writing a custom function / importing only a custom function over importing an entire library just to run a 2 lines function.

The new Temporal API in JS is precisely that.
Post reply on HN