- [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.