Releases: knowledgecode/date-and-time
Releases · knowledgecode/date-and-time
v4.5.0
What's Changed
- docs: migrate documentation site from VitePress to Astro Starlight by @knowledgecode in #123
- feat: add defaultDate option to parse/isValid for partial date string support by @knowledgecode in #124
Major Changes
- New
defaultDateoption:parse()andisValid()now accept adefaultDateobject (ParsedComponents) to supply fallback values for date/time components missing from the format string — useful for parsing time-only, month-day, or other partial date strings ParsedComponentsinterface: Extracted fromPreparseResultintoparser.tsas a standalone, reusable interface;PreparseResultnow extends it- Validation improvement:
isValid()validatesdefaultDatecomponents (e.g. an out-of-rangeHindefaultDatereturnsfalse); leap-day validation now respects adefaultDate.Ycontext - Precedence rule:
defaultDate.Z(timezone offset in minutes) takes precedence over thetimeZoneoption when both are present
Full Changelog: v4.4.0...v4.5.0
v4.4.0
What's Changed
- Bump flatted from 3.3.4 to 3.4.2 by @dependabot[bot] in #120
- Bump picomatch from 4.0.3 to 4.0.4 by @dependabot[bot] in #121
- feat: release v4.4.0 — new plugins, utilities, and docs improvements by @knowledgecode in #122
Major Changes
- New utility functions:
getDaysInMonth,getISOWeek,getISOWeekYearadded to public API - New plugins:
week(ISO 8601 week formatting),quarter(quarter-of-year),timestamp(Unix timestamp seconds/milliseconds) - Bug fixes: timezone name mapping corrections (Falkland, Greenland, Hawaii-Aleutian, Macao, and 10+ additions)
- Docs: CDN usage examples added to README, formatting improved across all pages
Full Changelog: v4.3.1...v4.4.0
v4.3.1
What's Changed
- Bump minimatch from 10.2.2 to 10.2.4 by @dependabot[bot] in #118
- Bump version to 4.3.1 and update dependencies by @knowledgecode in #119
Full Changelog: v4.3.0...v4.3.1
v4.3.0
What's Changed
- 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
Full Changelog: v4.2.0...v4.3.0
v4.2.0
What's Changed
- Bump preact from 10.27.1 to 10.28.2 by @dependabot[bot] in #115
- v4.2.0: Add timezone features and improve code organization by @knowledgecode in #116
Major Changes
- Consolidated timezone imports: Added a new date-and-time/timezone entry point allowing import of multiple timezones from a single module
- IANA timezone name string support: The format() function now accepts IANA timezone name strings (e.g., 'Asia/Tokyo') in addition to TimeZone objects
Full Changelog: v4.1.2...v4.2.0
v4.1.2
What's Changed
- Bump glob from 11.0.3 to 11.1.0 by @dependabot[bot] in #111
- Bump mdast-util-to-hast from 13.2.0 to 13.2.1 by @dependabot[bot] in #112
- Fix plugin import examples and update terminology in docs by @knowledgecode in #113
- Update dependencies and improve code quality by @knowledgecode in #114
Full Changelog: v4.1.1...v4.1.2
v4.1.1
What's Changed
- Bump vite from 5.4.20 to 5.4.21 by @dependabot[bot] in #108
- Bump js-yaml from 4.1.0 to 4.1.1 by @dependabot[bot] in #109
- Release 4.1.1: Add type definitions and update dependencies by @knowledgecode in #110
Full Changelog: v4.1.0...v4.1.1
v4.1.0
What's Changed
- Support literal square brackets in format strings by @knowledgecode in #107
Full Changelog: v4.0.5...v4.1.0
v4.0.5
What's Changed
- Bump vite from 5.4.19 to 5.4.20 by @dependabot[bot] in #105
- Release 4.0.5: Update plugin description and dependencies by @knowledgecode in #106
Full Changelog: v4.0.4...v4.0.5
v4.0.4
What's Changed
- Fix esbuild security vulnerability by @knowledgecode in #104
Full Changelog: v4.0.3...v4.0.4