unstale

npm / date-and-time

date-and-time

What changed in date-and-time 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-27.

1 breaking1 deprecations10 new APIs and options1 tooling7 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.8 on npm

date-and-time 420 changes

Breaking changes 1

  • defaultDate.Z takes precedence over the timeZone option when both are present.

    4.5.0release notes

Deprecations 1

  • Class-based plugins are deprecated; plugin authors should consider the new object-literal plugin types.

    4.6.0release notes

New APIs and options 10

  • Object-literal plugin types were added, giving plugin authors a new way to define plugins.

    4.6.0release notes

  • parse() and isValid() accept a ParsedComponents object to provide fallback values for date/time components missing from the format string.

    4.5.0release notes

  • A standalone, reusable interface is available in parser.ts; PreparseResult now extends it.

    4.5.0release notes

  • A new utility function is available in the public API.

    4.4.0release notes

  • A new plugin provides quarter-of-year functionality.

    4.4.0release notes

  • A new plugin supports Unix timestamp seconds and milliseconds.

    4.4.0release notes

  • A new plugin provides ISO 8601 week formatting.

    4.4.0release notes

  • All date manipulation functions now support IANA timezone strings.

    4.3.0release notes

  • A new entry point lets developers import multiple timezones from a single module.

    4.2.0release notes

  • The format() function accepts IANA timezone name strings in addition to TimeZone objects.

    4.2.0release notes

Tooling 1

  • Type definitions were added, allowing developers to use the package with type information.

    4.1.1release notes

Fixes and other changes 7

  • CJS type definitions were fixed.

    4.7.0release notes

  • Invalid-input handling was fixed.

    4.7.0release notes

  • CommonJS default-export interop was fixed.

    4.6.0release notes

  • Fixed a parsing bug involving defaultDate and 12-24-hour parsing.

    4.5.2release notes

  • isValid() validates defaultDate components, and leap-day validation respects a defaultDate.Y context.

    4.5.0release notes

  • Timezone name mappings were corrected for Falkland, Greenland, Hawaii-Aleutian, Macao, and 10+ additions.

    4.4.0release notes

  • Fixes timezone offset range and month boundary handling.

    4.3.0release notes