Fork me on GitHub

Depends how esoteric what I'm looking for is. Some things aren't on there.


The top comment on this hacker news thread about moment.js entering maintenance mode is great: "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 abandoneddead. 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 two page apologies for finishing their thing."

👍 9
💯 3

Yep. I share this person's despair! Funnily enough I've been slowly converting my Linux system to "old" software and it's so much faster, more reliable, and just generally more pleasant to use.


but contrasting that, the project maintainers actively recommend not using moment in new projects. its true that its "done" in some sense, but that's because the changes they actually want to do are breaking and widespread architectural changes. other libraries are recommended going forward


hehe, that's too funny. I mean I'm sure they have their reasons for recommending other software, but at the end of the day it's just a date and time formatting library. You'd think you could write one in a weekend, spend another 6 months fixing bug reports, and then call it done.


that doesn't match up with my experience.


and remember, these are the people that wrote a date time library, maintained it for years with 12M downloads per week and they are recommending something else. about as expert advice as you can get.


Maybe. To be honest, I stopped using moment for most projects a long time ago because I thought it was too bloated. I suspect that's what they can't overcome. I think the last time I needed a date formatter I actually did just write it myself, and I think I did it in an afternoon. Obviously it needed a tiny subset of features, but that's kind of the point.


But I don't want to rag on the project. It was a valuable contribution


that's fair. a known subset of requirements is a far cry from arbitrary date functions. and certainly one of their points was that moment.js is pretty heavy and not amenable to modern tree shaking to slim it down


Remember moment has to support a very broad feature set (formatting dates, parsing dates, comparing dates etc) also in very old browsers. They also started even before tree shaking was a thing...


These days the built-in Intl.* family of functions gives you most things built in the browser.


Yeah, I get it. But the same is even more true for jQuery, and that's a perfect example of a project that was mothballed years ago, but can still be downloaded and used with pleasure.


But I think the argument was about the mindset of people seeing that a project has been completed, and so refusing to use it as a consequence. That's the thing that's stupid


I mean, libraries needing to design themselves for tree shaking feels like the main issue


Which...come on Javascript


Mutability isn't the property we strive for, but it doesn't nuke projects like this usually


If it weren't for bundle restrictions it would be just like Date in java


Yeah use the new things, but it's fine if you have some dates flying around

Eric Casteleijn23:09:46

Anything to do with dates/times is unbelievably complex, and requires more frequent change than you would think. In my experience Moment was far from done, in that it has weird behavior and bugs, so I support the devs decision to discourage its use if they are no longer maintaining it. More in general, code that does not change atrophies, because the world and the ecosystem it exists within will not stop changing.

👍 6
Lennart Buit23:09:30

There are so many lists out there about falsehoods developers believe about dates. In other news tho, there is an ES proposal to add a more sensible date system to browsers. Ala what was done for Java 8. It’s early stage tho

Lennart Buit23:09:23

Ironically, because Date in JS was modeled after java.util.Date, it shares many of its flaws

Eric Casteleijn23:09:03

(Re: Java, it’s funny to me that one of the recommended replacements for Moment is joda-js, which is a JS port of a Java library that is itself abandoned, at this point 😉


The interesting thing is that the moment developers/maintainers sit on that committee for the temporal addition :)


As a something. Gavin King, the creator of Hibernate was instrumental in developing JPA.