News for hackers. Stuff that matters.
Re:Dates and Times in JavaScript – A New API for Dates from ... by SwiftyBug on Thursday July 09, 2020 @12:54PM (#23782196)
moment.js is so annoying because if I don't do momentObject.clone() everywhere I end up having many unwanted side-effects.
Re:Dates and Times in JavaScript – A New API for Dates from ... by Roboprog on Thursday July 09, 2020 @05:59PM (#23785732)
I have been lucky, then.

I pulled in moment about 5 years ago into our group’s stack, but we mostly use it for parsing and formatting date (only) strings for date arithmetic. The government vital records forms we are working with seldom deal with time of day, and when they do, it’s an optional string down to minutes resolution only.

I guess all the converting to and from strings coincidentally protected me from mutability. Good to know.

Re:Dates and Times in JavaScript – A New API for Dates from ... by flipchart on Thursday July 09, 2020 @01:03PM (#23782336)
I've been burned by this so many times! Code that uses moment is written, tested, and then never touched to make sure you stay sane
Re:Dates and Times in JavaScript – A New API for Dates from ... by ryzokuken on Thursday July 09, 2020 @04:57PM (#23785129)
The Temporal API is immutable, so you won't have to deal with it anymore.