Date is out, Temporal is in
Briefly

Date is out, Temporal is in
"I like when you can see the seams; I like how, for as formal and iron-clad as the ES-262 specification might seem, you can still see all the good and bad decisions made by the hundreds of people who've been building the language in mid-flight, if you know where to look. JavaScript has character. Sure, it doesn't necessarily do everything exactly the way one might expect, but y'know, if you ask me, JavaScript has a real charm once you get to know it!"
"There's one part of the language where that immediately falls apart for me, though. The Date constructor. I dislike Date immensely. Date sucks. It was hastily and shamelessly copied off of Java's homework in the car on the way to school and it got all the same answers wrong, right down to the name at the top of the page: Date doesn't represent a date, it represents a time."
JavaScript contains many charming quirks and visible historical design decisions. The Date constructor is described as particularly poor. Date stores times as Unix millisecond timestamps rather than true date objects. The API was apparently copied from Java's Date and carries inherited flaws. Java deprecated its Date decades ago while JavaScript retains the problematic design. Date parsing behavior is wildly inconsistent. Date only recognizes the local timezone and GMT and offers no broader timezone support. Date assumes the Gregorian calendar and lacks meaningful daylight saving time handling.
Read at Piccalilli
Unable to calculate read time
[
|
]