3 ms·
> But let us be honest, it has to compete with moment.js, not with Date(). Moment.js is deprecated: "Moment.js is a legacy project, now in maintenance mode. In
by rendall 5y ago
> But let us be honest, it has to compete with moment.js, not with Date().
Moment.js is deprecated: "Moment.js is a legacy project, now in maintenance mode. In most cases, you should choose a different library."
https://github.com/moment/moment/#project-status https://github.com/moment/moment/#project-status
- raxxorrax 5y agoTrue, but I think it will be some death of author kind of story. Nevertheless the handling has to be at least on a similar level.
- dstick 5y agoThat's only half the story. It's "deprecated" because it's done. There's nothing more to add, fix or improve in the eyes of the maintainer. What a nice place to end up in: _"We now generally consider Moment to be a legacy project in maintenance mode. It is not dead, but it is indeed done."_ https://momentjs.com/docs/ https://momentjs.com/docs/
- blowski 5y agoWow! Next time someone says "no piece of software is ever finished" I'll know where to send them.
- deleted 5y ago[deleted]
- paxys 5y agoYou skipped the line right after this which completely changed the meaning: > We recognize that many existing projects may continue to use Moment, but we would like to discourage Moment from being used in new projects going forward.
- dstick 5y agoFair enough, but the parent mentioned that without quoting this part. So I just posted the other half. Regardless, you’re right - new projects shouldn’t use it because of unknown future problems.
- rendall 5y ago> There's nothing more to add, fix or improve in the eyes of the maintainer. What a nice place to end up in What a strange thing to say. Baffling. It's deprecated because programming standards have changed, the team agrees with those standards and nevertheless feels it would be too much work to incorporate them. Not "there's nothing more to add" but "we choose to prioritize stability over new features"
- leotaku 5y agoNote that there exists a spiritual successor to Moment.js in Luxon[1]. The creator was a Moment maintainer and it lives under the Moment project umbrella. 1: https://moment.github.io/luxon/ https://moment.github.io/luxon/
- neals 5y agoAlso check out dayjs
- enlyth 5y agoI've been very happy with date-fns, picked it up after hearing good feedback from others: https://date-fns.org/ https://date-fns.org/
- trulyme 5y agoI found its interface inconsistent and unintuitive, especially compared to moment.js and day.js. Still better than Date though. :)
- spacehunt 5y agodate-fns's insistence on using the native Date object makes handling timezones horrible and error-prone though. Luxon is much better in this regard.
- mellavora 5y agoMoment is depreciated because all of its functions were moved to date-fns, which lets you import single functions.