Overview of date-fns-tz
masterdate-fns-tz provides time zone support for date-fns v3.0.0 by leveraging the native browser Intl API. This approach avoids including large time zone data bundles in your code.
Key details:
- Compatibility: Works in modern browsers and Node.js. For older environments, use an Intl polyfill.
- Time Zone Specification: You can use IANA time zone names (e.g.,
America/New_York) or offsets (e.g.,-0200,+04:00). If a polyfill is not used, IANA names are not supported. - Peer Dependency:
date-fnsis a required peer dependency.