Get the latest tech news
Date-fns 4.0
date-fns v4.0 is out with first-class time zone support and no major breaking changes.
You get an option to make all the calculations in UTC and remove the local time zone from the equation without adding any extra weight to the core library. I plan to extract custom locales and locale-dependant functions to separate packages like@date-fns/es and make the Intl-based format the default way to render dates. I also have Interim APIexperiment in work, a lightweight Temporal API subset, to help developers start using it now and when it’s time to migrate—simply find-and-replace class names or imports.
Or read this on Hacker News