Live data from Hacker News

We now consider Moment.js to be a legacy project in maintenance mode

momentjs.com

201–210 of 266 posts

Re: We now consider Moment.js to be a legacy project in maintenance mode

#201
post #52

Please pardon this drive-by assessment of JS calendar libraries by a casual user. moment.js: Mutable. Thank you, next. Luxon: Takes the effort to implement `Interval`, which would be `Range ` in any proper language, but somehow avoids providing separate `Date` and `Time` objects. Day.js: When you kinda like moment.js, but your bundler says it's too fat. date-fns: The finest of pure, curry-able functions over the mine…

> 1b) `DateTime` should probably be split into two separate things, one of which is aware of time zones.

due to daylight saving timezones depend on the date, which makes it hard to separate date and time

Re: We now consider Moment.js to be a legacy project in maintenance mode

#202

Our favorite bug for newbies using moment.js: const somedate = moment(...somedate...); const oneMonthLater = somedate.add(1, 'M'); const dateToCheck = ...; // between somedate and somedate + 1 month if (dateToCheck.isBetween(somedate, oneMonthLater)) { // do something } The puzzled looks when the tests fail. I'll miss that. Seriously.

Gotta love immutables after that...

Re: We now consider Moment.js to be a legacy project in maintenance mode

#203

TIL: Intl.DateTimeFormat [1] has good browser support [2] and allows for nifty tricks like > new Intl.DateTimeFormat('zh', { hour: 'numeric' }).format(new Date) [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... "MDN: Intl.DateTimeFormat" [2]: https://caniuse.com/mdn-javascript_builtins_intl_datetimefor... "Can I Use: Intl.DateTimeFormat"

Not sure if this is a stupid suggestion, but could there be a drop-in replacement for moment which uses Intl and other modern browser APIs, otherwise fetches the full moment.js? Or does MomentJS already do that?

[deleted]

Re: We now consider Moment.js to be a legacy project in maintenance mode

#204

Good for them. Open Source seems to have an irrational fear of done . Done is good. Done should be the goal. But it’s not. Because if you’re not adding new features and pushing code changes every day, your project is abandoned , dead . To quote another thread from two minutes ago: “I’m quite sad to see the end of Moment.js” I wish the was a way to fix this attitude. So that project maintainers didn’t need to write tw…

> I wish the was a way to fix this attitude. So that project maintainers didn’t need to write two page apologies for finishing their thing. One of the problems is that GitHub is full of OSS libraries where the last commit was three years or more ago and you have no idea (without forensically analysing commits, issues, etc.) whether it's because the project is done or because the maintainer(s) lost interest, had other…

I ended up resurrecting someone's github project by introducing a PR to fix a configuration bug. It sat for a while before the maintainer saw it, but he merged it. Then half a dozen other PRs showed up in the next six months.

You can't tell if a project is dead by the commit dates, but you might be able to tell via open PRs that go unacknowledged.

Re: We now consider Moment.js to be a legacy project in maintenance mode

#205
Moment's API makes it a source for subtle bugs. In particular, the conflation of dates, times, and datetimes as a single structure. This damage goes beyond the lib, into ones it's influenced, like Arrow in Python.

I'd love to see something like Rust's Chrono ported to JS via WASM. In a TS project I did a few years ago, I had to roll my own DT lib.

Re: We now consider Moment.js to be a legacy project in maintenance mode

#206

Earlier quoted context omitted.

> I wish the was a way to fix this attitude. So that project maintainers didn’t need to write two page apologies for finishing their thing. One of the problems is that GitHub is full of OSS libraries where the last commit was three years or more ago and you have no idea (without forensically analysing commits, issues, etc.) whether it's because the project is done or because the maintainer(s) lost interest, had other…

> One of the problems is that GitHub is full of OSS libraries where the last commit was three years or more ago and you have no idea (without forensically analysing commits, issues, etc.) whether it's because the project is done or because the maintainer(s) lost interest, had other priorities, etc. I don't think there's any at least medium sized project that is considered to be done but not abandoned/legacy and does…

There are a couple of projects I track where more than half of the commits are just updating dependencies or compatibility information.

It's both a responsible thing to do and a form of virtue signalling. Yes, we are still here.

Re: We now consider Moment.js to be a legacy project in maintenance mode

#207
post #192
post #168

I don't know if the Moment.js folks are reading this, but THANK YOU for your commitment to stability and security fixes. Not all of us are in a situation where we're iterating through the JavaScript new hotness every couple years and still have significant legacy systems to maintain and support.

Yes, and you're welcome.

Thank you.

I pulled in moment.js 5 years ago for a suite of state death and birth certificate registration apps we are working on.

Due to the amount of “business logic” and small staff size on these, they take years to roll out. I appreciate that this library will “hold still” for a few years.

Not all of us are churning out a new e-commerce app every 3 months. E.g. we replaced the birth certificate app from the 80s, and I expect some version of our app to be around for at least a decade, albeit with patches for new browsers on the front end and new Java app servers on the back end.

Re: We now consider Moment.js to be a legacy project in maintenance mode

#208

Earlier quoted context omitted.

You might benefit from flipping this around and asking yourself why you're not able to ship software that remains shipped without intervention. And why you can't even imagine a world where that would be possible. If you spend some time and effort removing whatever obstacles you have in place that are keeping you from being able to do that, you'll have a lot more free time to spend building new things. For what it's w…

So your projects have no dependencies? You just write everything from scratch? Your code is perfect the first time you write it? I'm utterly confused by this comment.

If you want stable, long lifespan software, this is exactly how you do it. You are also careful to only build on layers of abstraction that are also designed with this mindset. Yes, it limits what you can do and which features you can rely on, but it is an achievable goal for many critical lower level libraries.

Re: We now consider Moment.js to be a legacy project in maintenance mode

#209

Earlier quoted context omitted.

> ...but there's nothing to "fix", it works as intended If there were nothing to fix, they wouldn't be telling people not to start new projects with Moment. They actually do mention a few significant issues that they can't / won't fix in Moment such as bundle size and mutability. I will concede that perhaps Moment was "done" at some point before, some years back. When it was quite complete, yet was still the best way…

Mutability isn't an "issue", it's just not the fad of the day. Personally I like mutable objects. The size isn't that bad either. I'm not going to stop using moment in new or existing projects for petty reasons like the ones presented. I'm tired of having the rug pulled out from under me every time I'm comfortable with something.

Ditto. While the rest of the world messes with all the problems the alternatives have, I'm just gonna drop in moment, solve the problem at hand with a few lines of code and be done with it. Date/time handling in JS is a solved problem and the solution is called moment.js.
Post reply on HN