JavaScript's date object has been tricky for years, but that is changing. The NEW Temporal API brings, 🌍 Easily handle time zones 📆 Precise date math 🕒 Parse ISO strings without errors ⌛ Durations, date ranges, and more. Start experimenting 👇 developer.mozilla.org/en-US/docs/...
Post
developer.mozilla.orgTemporal - JavaScript | MDNThe Temporal object enables date and time management in various scenarios, including built-in time zone and calendar representation, wall-clock time conversions, arithmetics, formatting, and more. It is designed as a full replacement for the Date object.
Also, the start (and therefore end) of a date should be able to differ from midnight. It should be simple for authors to declare additional (special-purpose,custom, novel or rare) calendar systems. 10^8 days is wide enough a span for all of recorded human history, but not enough for astronomy.
0 reposts1 like
A pluggable calendar API was part of an earlier version of the proposal, but it was dropped due to complexity and limited use cases. You can read more about the reasoning and options in github.com/tc39/proposa....