Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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



That'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/


You 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.


Fair 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.


> 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"


Wow! Next time someone says "no piece of software is ever finished" I'll know where to send them.


Note 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/


Also check out dayjs


I've been very happy with date-fns, picked it up after hearing good feedback from others: https://date-fns.org/


date-fns's insistence on using the native Date object makes handling timezones horrible and error-prone though. Luxon is much better in this regard.


I found its interface inconsistent and unintuitive, especially compared to moment.js and day.js. Still better than Date though. :)


True, 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.


Moment is depreciated because all of its functions were moved to date-fns, which lets you import single functions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: