- [DEPS]
date-fns@4.0.0
supported (#301) - [PERFORMANCE] Make testDateFormatted static to avoid re-initialising it on every call (#297) @hurali97
- [ENHANCEMENT] Compatibility with
date-fns
setDefaultOptions
(#286) @yangchristina - [DOCS] Fixed table of contents links (#284)
- [BUGFIX] Make
getTimeZoneOffset
's 2nd arg optional
- [BUGFIX] Fix
formatInTimeZone
use oftimeZone
string (#280)
- [BUGFIX]
getTimeZoneOffset
's 2nd arg should be optional (#281)
- [REFACTOR] Full rewrite in TypeScript (#278) Thank you, @brettwillis
- [BREAKING CHANGE]
OptionsWithTZ
is now eitherFormatOptionsWithTZ
orToDateOptionsWithTZ
, matchingdate-fns
- [BUGFIX] Fix named export typings (#277)
- [UPGRADE] Support
date-fns
v3 (#265) Thank you, @christopherklint97 - [BUGFIX] Correct import of
date-fns@v3
format and use Babel Webpack loader for mjs files (#271) - [BREAKING CHANGE]
date-fns
v2 is no longer supported - [BREAKING CHANGE] Renamed
utcToZonedTime
totoZonedTime
to make the name less confusing, just search & replace - [BREAKING CHANGE] Renamed
zonedTimeToUtc
tofromZonedTime
to make the name less confusing, just search & replace - [BREAKING CHANGE] All functions are now exported using named exports, this requires changing direct
imports from
import formatInTimeZone from 'date-fns-tz/formatInTimeZone'
toimport { formatInTimeZone } from 'date-fns-tz/formatInTimeZone'
- [BREAKING CHANGE] Functions now don’t check the number of passed arguments, delegating this task to type checkers
(This isn't fully implemented yet, but it should be the assumption moving forward, as it is in
date-fns
) - [BREAKING CHANGE] Arguments are not explicitly converted to the target types. Instead, they are passed as is,
delegating this task to type checkers (This isn't fully implemented yet, but it should be the assumption
moving forward, as it is in
date-fns
) - [BREAKING CHANGE] IE is no longer supported since
date-fns
no longer supports it - [BREAKING CHANGE] Removed
flow
support sincedate-fns
also removed it
- [DOCS] Fix incorrect output comment (#270)
- [DEPS] Limit to date-fns 2.x (#262, #267)
- [REFACTOR]
tzTokenizeDate
: Remove weird unneeded regex (#254) - [BUGFIX] Improving correctness of the
formatInTimeZone
close to the DST threshold (#247) - [ENHANCEMENT] Use hourCycle for browsers that support hour cycle formatting (#231)
- [BUGFIX] Fix tzParseTimezone to parse 00:30 timezones properly (#229)
- [BREAKING CHANGE] Optimize configuration for ESM exports (entry points for cjs / esm / typescript) (#212)
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 (#220) - [TYPES] Update
format
types to match date-fns (#199) - [BUGFIX] Fixed
undefined
timezone error (#214)
- [BUGFIX] Fixed getting the time zone name in
partsTimeZone
out offormatToParts
(#196) - [BUGFIX]
tzTokenizeDate
usesmonth: numeric
as a possible fix for #190
- [BUGFIX] Remove the use of
const
(#192)
- [BUGFIX] Fixed
utcToZonedTime
not working with year < 100; thanks @healqq (#185)
- [BUGFIX] Add new to
DateTimeFormat
invocation to fix mocking it in tests (#181) - [DOCS] Add notes on usage with Android
- [BUGFIX] Fix broken ESM import (#177)
- [BUGFIX] Support tz offsets up to +/-23:59 (#171)
- [BUGFIX] Fixed zonedTimeToUtc not working with year < 100 (#87, #170)
- [BUGFIX] ESM export of package.json (#173)
- [BUGFIX] Round tz offset correctly to format old dates (#169, #168)
- [ENHANCEMENT] Native ESM support via
exports
configuration inpackage.json
(#133, #150) - [DOCS] Clarify the use of ESM vs CommonJS import paths
- [DOCS] Clarify when
format
throws aRangeError
and fix the test for it - [ENHANCEMENT] More extensive validation of numeric time zone offsets
- [BUGFIX] Fixed
zonedTimeToUtc
throwingRangeError
instead of returning an Invalid Date (#151) - [BUGFIX] Fixed
format
not throwingRangeError
for invalid time zones with offset tokens (#152)
- [BUGFIX] Fix
formatInTimeZone
types and fp arguments
- [DOCS] Fixed a broken link (#148)
- [ENHANCEMENT] Add
formatInTimeZone
- [DOCS] Various improvements and corrections
- [BUGFIX] Fixed
zonedTimeToUtc
parsing of date strings with time zone specifiers - [ENHANCEMENT] Functions that return dates will return
Invalid Date
for bad date / time zone inputs, andformat
functions throw aRangeError
- [BUGFIX] Fix
format
returning wrong time zone offset close to DST. (#138)
- [PERFORMANCE] Improve performance when validating the same timezones many times through caching; thanks @billthornton (#135)
- [TESTS] Added a test for #33 which now passes
- [BUGFIX] Fix
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 (#131)
- [BUGFIX] Fixed parsing IANA strings (#129)
- [UPGRADE] Use Yarn berry
- [BUGFIX] Restore IE11 support (#112)
- [BUGFIX] Support IANA timezones with a hyphen in the name! (#110)
- [BUGFIX] Fix time zone offset around DST; thanks @bsvetlik & @yharaskrik! (#108, #99, #93)
- [DOCS] Add
getTimezoneOffset
to TOC
- [ENHANCEMENT] Add the
getTimezoneOffset
function (#100). - [UPGRADE] Upgrade dependencies
- [BUGFIX] Improve the #46 fix for
toDate
using the UTC timestamp for determining offset (#86).
- [BUGFIX] Fix uctToZonedTime during timezone changes (#80).
- [BUGFIX] Fix
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).
- [DOCS] Improve the documentation, particularly on the usage of
format
.
- [BUGFIX] Not losing milliseconds when converting time zones. (#25)
- [BUGFIX] Fix missing
_lib/convertToFP/index.js
. (#20) - [UPGRADE] Upgrade dependencies and match the
date-fns@2
build config.
- [BUGFIX] Rewrite import paths in esm version to use esm version of date-fns. (#8 @pkaske)
- [BUGFIX] Removed
const
,let
, template string and arrow function syntax which is not transpiled in the ems build to fix for IE11.
- [ENHANCEMENT] Typescript typings.
Initial release.