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/do

0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.social/users/mdn/statuses/115588517447757274 on your instance and quote it. (Note that quoting is not supported in Mastodon.)