Re:The best programmers I know
by chrisweekly on Wednesday April 09, 2025 @09:10AM
(#43631652)
Moment.js is one of those libraries to avoid; the bloat....
I still like Moment because it offers better control of time zones that aren’t the browsers time zone when compared to the builtin Date APIs.
Do you have a recommendation to replace Moment for that use case?
I’m hopeful for the future with JavaScript Temporal.
Re:The best programmers I know
by microflash on Wednesday April 09, 2025 @10:56AM
(#43632877)
dayjs is a similar library that I’ve used to replace Moment with minimal effort.
A maintainer of moment.js has moved on with an immutable rewrite called luxon.js. Highly recommended.
Also, there are higher level libraries that are sometimes good, because why reinvent the wheel every time you make something? Pixijs is one I use a lot. Also, Chart.js. Jquery. Moment.js. Good ol' Bootstrap 4 alpha's CSS handles a ton of use cases, and I never need to think about it again. There's very little in those that I haven't at one time or another rolled myself, but having a toolkit that you know and doesn't change much saves you a lot of time. The danger is more getting into libraries that aren't already dead, and are still in active development ;)