Release v4.3.0: Add IANA timezone string support#117
Merged
knowledgecode merged 4 commits intomasterfrom Feb 23, 2026
Merged
Conversation
- Remove local timezone dependency in getLastDayOfMonth by using Date.UTC - Expand timezone offset (Z token) valid range from -840~720 to -913~956 to support historical timezone offsets (e.g., Metlakatla, Manila) - Add test cases for min (America/Metlakatla) and max (Asia/Manila) offsets
- Move isUTC helper from zone.ts to datetime.ts and add dtfToParts helper - Refactor getTimezoneOffset and createTimezoneDate in zone.ts to accept IANA timezone name strings (e.g., 'America/Los_Angeles') in addition to TimeZone objects - Update ParserPluginOptions.timeZone type to TimeZone | string in parser.ts; integrate ignoreCase logic into find function and add validateToken - Update day-of-week plugin to use new find signature with options parameter - Change timeZone argument type to TimeZone | string in addDays, addMonths, addYears, parse, and preparse - Add test cases for IANA string timezones and historical timezone changes (Metlakatla, Manila); expand boundary values to -1601/+1601
- Update type signatures from TimeZone | 'UTC' to TimeZone | string across all API docs (addDays, addMonths, addYears, format, parse, subtract, etc.) - Document IANA timezone string usage for all date manipulation functions - Add v4.3.0 new features section to migration.md - Promote Method 3 (IANA string) as the recommended approach in timezones.md - Fix minor grammar and punctuation issues
- Bump version from 4.2.0 to 4.3.0 - Upgrade ESLint 9 to 10 and add @eslint/js - Update @stylistic/eslint-plugin, @types/node, vitest, rollup, and typescript-eslint to latest versions - Add minimatch: ^10.2.2 to overrides - Add SwitchCase: 0 to @stylistic/indent rule in eslint.config.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
addDays,addMonths,addYears,parse,format, etc.)isValidTest Plan
tests/parse.spec.tsisValidedge case tests pass intests/isValid.spec.ts