Skip to content

Comments

Release v4.3.0: Add IANA timezone string support#117

Merged
knowledgecode merged 4 commits intomasterfrom
develop
Feb 23, 2026
Merged

Release v4.3.0: Add IANA timezone string support#117
knowledgecode merged 4 commits intomasterfrom
develop

Conversation

@knowledgecode
Copy link
Owner

@knowledgecode knowledgecode commented Feb 23, 2026

Summary

  • Add IANA timezone string support to all date manipulation functions (addDays, addMonths, addYears, parse, format, etc.)
  • Fix timezone offset range and month boundary handling in isValid
  • Update documentation to reflect v4.3.0 API changes

Test Plan

  • All existing tests pass
  • New IANA timezone string tests pass in tests/parse.spec.ts
  • isValid edge case tests pass in tests/isValid.spec.ts

- 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
@knowledgecode knowledgecode merged commit f25d677 into master Feb 23, 2026
4 checks passed
@knowledgecode knowledgecode deleted the develop branch February 23, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant