NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2927 most downloaded on npm
Time zone support for date-fns v3 with the Intl API
Last release 2 years ago
no release in 18 months
Ships unpredictably
gaps range from 8 days to 1.1 years
Most releases are documented
notes for 39 of 45 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
61 releases · first in 2018
[DEPS] date-fns@4.0.0 supported
date-fns@4.0.0 supported (#301)date-fns setDefaultOptions (#286) @yangchristina[BUGFIX] Make getTimeZoneOffset's 2nd arg optional
getTimeZoneOffset's 2nd arg optionalOne column per quarter.
[BUGFIX] Fix formatInTimeZone use of timeZone string
formatInTimeZone use of timeZone string (#280)[BUGFIX] getTimeZoneOffset's 2nd arg should be optional
getTimeZoneOffset's 2nd arg should be optional (#281)[BREAKING CHANGE] OptionsWithTZ is now either FormatOptionsWithTZ or ToDateOptionsWithTZ, matching date-fns
OptionsWithTZ is now either FormatOptionsWithTZ or ToDateOptionsWithTZ, matching date-fns[BUGFIX] Fix named export typings
Nothing published for this version
This release adds support for date-fns v3. Thank you @christopherklint97 ( #265 ) and everyone who helped test and fix the beta releases.
This release adds support for date-fns v3. Thank you @christopherklint97 (#265) and everyone who helped test and fix the beta releases.
BREAKING CHANGES
date-fns v2 is no longer supportedutcToZonedTime to toZonedTime to make the name less confusing, just search & replacezonedTimeToUtc to fromZonedTime to make the name less confusing, just search & replaceimport formatInTimeZone from 'date-fns-tz/formatInTimeZone' toimport { formatInTimeZone } from 'date-fns-tz/formatInTimeZone'date-fns v3date-fns v3date-fns no longer supports itflow support since date-fns also removed itdate-fns v3 (#265) Thank you, @christopherklint97date-fns@v3 format and use Babel Webpack loader for mjs files (#271)date-fns v2 is no longer supportedutcToZonedTime to toZonedTime to make the name less confusing, just search & replacezonedTimeToUtc to fromZonedTime to make the name less confusing, just search & replaceimport formatInTimeZone from 'date-fns-tz/formatInTimeZone' to
import { formatInTimeZone } from 'date-fns-tz/formatInTimeZone'date-fns)date-fns)date-fns no longer supports itflow support since date-fns also removed itNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
[DOCS] Fix incorrect output comment
tzTokenizeDate: Remove weird unneeded regex (#254)formatInTimeZone close to the DST threshold (#247)[BREAKING CHANGE] Optimize configuration for ESM exports (entry points for cjs / esm / typescript)
Upgrade guide: Both CJS and ESM imports now use the default import paths. CJS will continue working unchanged; to fix ESM imports:
Before:
import { format } from 'date-fns-tz/esm'
import utcToZonedTime from 'date-fns-tz/esm/utcToZonedTime'
After:
import { format } from 'date-fns-tz'
import utcToZonedTime from 'date-fns-tz/utcToZonedTime'
[TESTS] Tests documenting zonedTimeToUtc daylight saving jumps
zonedTimeToUtc daylight saving jumps (#220)format types to match date-fns (#199)undefined timezone error (#214)[BUGFIX] Fixed getting the time zone name in partsTimeZone out of formatToParts
partsTimeZone out of formatToParts (#196)tzTokenizeDate uses month: numeric as a possible fix for #190[BUGFIX] Remove the use of const
const (#192)[BUGFIX] Fixed utcToZonedTime not working with year < 100; thanks @healqq
utcToZonedTime not working with year < 100; thanks @healqq (#185)[BUGFIX] Add new to DateTimeFormat invocation to fix mocking it in tests
DateTimeFormat invocation to fix mocking it in tests (#181)- [BUGFIX] Fix broken ESM import
[BUGFIX] Support tz offsets up to +/-23:59
[BUGFIX] ESM export of package.json
[ENHANCEMENT] Native ESM support via exports configuration in package.json (#133, #150)
exports configuration in package.json (#133, #150)format throws a RangeError and fix the test for itzonedTimeToUtc throwing RangeError instead of returning an Invalid Date (#151)format not throwing RangeError for invalid time zones with offset tokens (#152)Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
[BUGFIX] Fix formatInTimeZone types and fp arguments
formatInTimeZone types and fp argumentsformatInTimeZonezonedTimeToUtc parsing of date strings with time zone specifiersInvalid Date for bad date / time zone
inputs, and format functions throw a RangeErrorformat returning wrong time zone offset close to DST. (#138)format handling of quoted text next to a time zone token (#136)- [DOCS] Fixed a broken link
[ENHANCEMENT] Add formatInTimeZone
formatInTimeZonezonedTimeToUtc parsing of date strings with time zone specifiersInvalid Date for bad date / time zone
inputs, and format functions throw a RangeErrorformat returning wrong time zone offset close to DST. (#138)[PERFORMANCE] Improve performance when validating the same timezones many times through caching; thanks @billthornton
format handling of quoted text next to a time zone token (#136)[BUGFIX] Added an error object to the catch of isValidTimezoneIANAString for older JS
[BUGFIX] Fixed parsing IANA strings
- [UPGRADE] Use Yarn berry - [BUGFIX] Restore IE11 support
[BUGFIX] Support IANA timezones with a hyphen in the name!
[BUGFIX] Fix time zone offset around DST; thanks @bsvetlik & @yharaskrik! (#108, #99, #93)
[DOCS] Add getTimezoneOffset to TOC
getTimezoneOffset to TOC[ENHANCEMENT] Add the getTimezoneOffset function (#100).
getTimezoneOffset function (#100).[BUGFIX] Improve the #46 fix for toDate using the UTC timestamp for determining offset (#86).
toDate using the UTC timestamp for determining offset (#86).[BUGFIX] Fix uctToZonedTime during timezone changes (#80).
toDate using the UTC timestamp for determining offset (#46).[BUGFIX] Fix day wrapping when the result is midnight in new browsers supporting DTF hourCycle (#38, #41, #43).
hourCycle (#38, #41, #43).[DOCS] Improve the documentation, particularly on the usage of format.
format.[BUGFIX] Not losing milliseconds when converting time zones.
_lib/convertToFP/index.js. (#20)date-fns@2 build config.Nothing published for this version
Nothing published for this version
Nothing published for this version
Rewrite import paths in esm version to use esm version of date-fns. (#8 @pkaske)
Rewrite import paths in esm version to use esm version of date-fns. (#8 @pkaske)
Nothing published for this version
Nothing published for this version
Nothing published for this version
Removed const, let, template string and arrow function syntax which is not transpiled in the ems build.
Removed const, let, template string and arrow function syntax which is not transpiled in the ems build.
const, let, template string and arrow function syntax which is not transpiled in
the ems build to fix for IE11.Nothing published for this version
Nothing published for this version
Fixes the errors with the Typescript typings (#3).
Fixes the errors with the Typescript typings (#3).
Nothing published for this version
Included typings in package.json.
Included typings in package.json.
Initial release.
Initial release.
Your coding agent can read these notes before it upgrades. Set up the MCP server →