All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
This change log follows the format documented in Keep a CHANGELOG.
- Fixed incorrect
package.jsonpublished with@date-fns/tz@1.4.0.
- Added support for time zones with seconds offset. It allows to handle dates before the implementation of the GMT system in 1883. Huge kudos to @GianlucaWassermeyer!
- Fixed TypeScript definitions missing in
@date-fns@1.3.0.
-
Fixed Format.JS support when running in Hermes engine (React Native). Ensured compatibility with JavaScriptCore engine (Safari).
-
Fixed TypeScript
node16module resolution #59. Thanks to @samchungy.
- Added
tzNamefunction that formats time zone name in given date time and format. It supports"short","long","shortGeneric", and"longGeneric"formats, corresponding to TR35 tokensz..zzz,zzzz,v, andvvvvrespectively. See README for more details.
- Fixed issue with
setTimenot syncing the value to the internal date resulting in incorrect behavior #16, #24.
- Improved compatibility with FormatJS Intl polifyll #8. Thanks to @kevin-abiera.
- Reworked DST handling to fix various bugs and edge cases. There might still be some issues, but I'm actively working on improving test coverage.
This is yet another critical bug-fix release. Thank you to all the people who sent PRs and reported their issues. Special thanks to @huextrat, @allohamora and @lhermann.
-
Fixed negative fractional time zones like
America/St_Johns@allohamora. -
Fixed the DST bug when creating a date in the DST transition hour.
- Added support for
±HH:MM/±HHMM/±HHtime zone formats for Node.js below v22 (and other environments that has this problem) #3
This release fixes a couple of critical bugs in the previous release.
-
Fixed UTC setters functions generation.
-
Create
Invalid Dateinstead of throwing an error on invalid arguments. -
Make all the number getters return
NaNwhen the date or time zone is invalid. -
Make
tzOffsetreturnNaNwhen the date or the time zone is invalid.
Initial version