Skip to content

Releases: knowledgecode/date-and-time

v4.5.0

06 May 02:27
b505b94

Choose a tag to compare

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 defaultDate option: parse() and isValid() now accept a defaultDate object (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
  • ParsedComponents interface: Extracted from PreparseResult into parser.ts as a standalone, reusable interface; PreparseResult now extends it
  • Validation improvement: isValid() validates defaultDate components (e.g. an out-of-range H in defaultDate returns false); leap-day validation now respects a defaultDate.Y context
  • Precedence rule: defaultDate.Z (timezone offset in minutes) takes precedence over the timeZone option when both are present

Full Changelog: v4.4.0...v4.5.0

v4.4.0

29 Mar 01:09
ebcd8f6

Choose a tag to compare

What's Changed

Major Changes

  • New utility functions: getDaysInMonth, getISOWeek, getISOWeekYear added 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

07 Mar 01:38
b3d5f43

Choose a tag to compare

What's Changed

Full Changelog: v4.3.0...v4.3.1

v4.3.0

23 Feb 09:51
f25d677

Choose a tag to compare

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

18 Jan 09:03
c54dc6e

Choose a tag to compare

What's Changed

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

14 Dec 03:31
01e60eb

Choose a tag to compare

What's Changed

Full Changelog: v4.1.1...v4.1.2

v4.1.1

17 Nov 08:50
30c9a7c

Choose a tag to compare

What's Changed

Full Changelog: v4.1.0...v4.1.1

v4.1.0

08 Oct 06:34
2ffaa04

Choose a tag to compare

What's Changed

Full Changelog: v4.0.5...v4.1.0

v4.0.5

12 Sep 08:05
e2066ae

Choose a tag to compare

What's Changed

Full Changelog: v4.0.4...v4.0.5

v4.0.4

01 Sep 08:11
0223e96

Choose a tag to compare

What's Changed

Full Changelog: v4.0.3...v4.0.4