Skip to content

v0.1.1

Choose a tag to compare

@sina-heidariaan sina-heidariaan released this 21 Jul 00:33
· 11 commits to main since this release

[0.1.1] — 2026-07-21

Initial release.

Added

  • format(value, pattern) — token formatting directly on any Temporal value
    (PlainDate, PlainTime, PlainDateTime, PlainYearMonth, PlainMonthDay,
    ZonedDateTime). No JavaScript Date in the code path.
  • parse(input, pattern, targetTypeName, options?) — numeric token parsing that
    constructs a real Temporal value via native globalThis.Temporal or a
    caller-supplied { temporal } implementation.
  • Unicode TR35-style numeric token set: yyyy yy y MM M dd d HH H mm m ss s S…
    plus ZZ (UTC offset) and VV (IANA zone id) for ZonedDateTime. Single-quoted
    literals ('T', '').
  • Per-type token validity checks; documented two-digit-year (yy) pivot
    (00–68 → 2000s, 69–99 → 1900s); overflow: "reject" so out-of-range input fails
    loudly.
  • getTemporalType, isTemporal, and the error types FormatError, ParseError,
    InvalidPatternError.
  • Zero runtime dependencies. Dual CJS/ESM builds with .d.ts/.d.cts; subpath
    exports temporal-format-parse/format and temporal-format-parse/parse for tree-shaking.