JavaScript Temporal is coming
developer.mozilla.org
JavaScript Temporal is coming
1–10 of 416 posts
Re: JavaScript Temporal is coming
#2Re: JavaScript Temporal is coming
#3Re: JavaScript Temporal is coming
#4Re: JavaScript Temporal is coming
#5I personally like that approach, but I'm not sure how much sense that makes without static typing. (Maybe TypeScript is established enough that JavaScript APIs are now designed with TypeScript in mind?)
From experience with js-joda, there's a definitely learning curve compared to moment's "one size fits all" type for all things date related. But I found that a lot of stupid mistakes of the kind "a person's age is wrong for an hour after midnight during daylight savings time" are prevented by default.
Re: JavaScript Temporal is coming
#6Re: JavaScript Temporal is coming
#7Relevant XKCD : https://xkcd.com/2867/
Re: JavaScript Temporal is coming
#8They should add an event to detect when someone changes timezones. That could be another entry in the "falsehoods that programmers believe about time": programmers believe that your timezone is fixed during usage. But in reality there are millions of people moving between timezones every day.
Re: JavaScript Temporal is coming
#9Coming but only available in one browser or run time, and then with a feature flag.
Re: JavaScript Temporal is coming
#10Javascript is all we have for front end web apps now, impoverished as it is as a language. But excuse me if I don't get excited every time a proposal is rolled out to bring it close to the 21st century.