Does this mean we can finally stop downloading and running a third of a MB of js on every website? moment.js, luxon, date-fns, are all obsolete? https://bundlephobia.com/package/moment@2.30.1
JavaScript Temporal is coming
181–190 of 416 posts
Re: JavaScript Temporal is coming
#182Temporal is great. I've been using it for a while in production using a polyfill [1], and it solves all issues I've encountered with the old Date() API (which is a lot). It clearly takes inspiration from other high-quality time libraries such as chrono in Rust and Joda Time in Java and combines them into a nice API that's pretty comfortable to use. Yes, it is a bit more complex to handle since it separates time into…
Those of us of a certain age learned long ago never to schedule cron (etc.) jobs in a production environment between 01:00 and 03:00 local time.
Re: JavaScript Temporal is coming
#183Earlier quoted context omitted.
And lived on a flat planet.
That’s not a valid argument. There is no reason why people in Japan couldn’t start their workday at 03:00, or people in France at 22:00
Re: JavaScript Temporal is coming
#184Re: JavaScript Temporal is coming
#185Re: JavaScript Temporal is coming
#186Re: JavaScript Temporal is coming
#187Oh wow, I was complaining about working with dates in JavaScript around 2010 or so. It only took 15 years to sort this out.
Re: JavaScript Temporal is coming
#188Earlier quoted context omitted.
why does the polyfill have dependencies? And it's 200KB alone compared to 60KB of moment.
If payload size is the top concern you shouldn't be using Moment either though. Luxon and DayJS are both considerably smaller (their uncompressed size is about what Moment's compressed size is) and the date-fns library is much, much smaller and also tree-shakeable. Moment also performs at or near the bottom of all available options if speed is a concern. Other than reflexive popularity or the cost already being paid…
Re: JavaScript Temporal is coming
#189Re: JavaScript Temporal is coming
#190> working with dates and times in JavaScript will be hugely simplified > To help you get up to speed, there are over 270 pages of Temporal docs on MDN Not that I'm complaining about extensive documentation, but seeing these two lines juxtaposed doesn't inspire much confidence.