JavaScript's date object has been tricky for years, but that will change soon.
The NEW Temporal API brings, Easily handle time zones
Precise date math
Parse ISO strings without errors
Durations, date ranges, and more.
Start exploring
https://developer.mozilla.org/en-US/blog/javascript-temporal-is-coming/