Hacker News new | ask | show | jobs
by notaboutdave 3139 days ago
This is an excellent rewrite, but I'm hesitant to try it because Moment doesn't emphasize speed.

I'm in need of a fast date and time library (close to realtime) and have reluctantly rolled my own until I find a better option.

2 comments

For what it's worth, there's no code (edit: well, maybe a few lines) in common between the libraries; Luxon is written from scratch. I haven't done a ton of perf testing, but depending on your use case, I'd expect most operations to be much faster in Luxon. The caveat there is that Moment objects are mutable, which can sometimes be a perf advantage.
Have you tried date-fns (http://date-fns.org/)? One good thing is that they bundle every module separately, so you can only import what you need.