CodeVetter · Repo Unpack · System map
date-fns/date-fns
The repository separates date calculation, date subclasses, documentation publishing, and development tooling into workspace packages. Consumers enter through exported functions and classes rather than a central application startup routine. Core package output supports both ESM and CommonJS, while workspace exports reference source files. Persistent storage appears in the documentation publisher; the inspected calculation paths operate on in-memory dates and options.
- pnpm-workspace.yaml includes pkgs/* and the time-zone engine-test package; root TypeScript references core, docs, utc, tz, and engine tests.
- The core export surface includes independent arithmetic, difference, interval, formatting, parsing, predicate, and boundary functions, plus shared types.
- Published core root imports resolve to index.js/index.d.ts, while require resolves to index.cjs/index.d.cts.
- TZDate extends TZDateMini's target-zone representation; UTCDate extends UTCDateMini's redirected UTC accessors.
- The private dev package exposes date-fns-build-package and date-fns-test-tz; its builder preserves modules, externalizes imports, and rewrites relative import extensions.
- The docs package exposes date-fns-docs and uses Firebase Admin with Typesaurus collections named packages, versions, and pages.
- Auxiliary applications are a React/Vite formatted-date example and a Hono playground serving browser JavaScript on port 3000.
- Temporal-oriented index.tp.ts implementations have a separate Vitest project and are excluded from production source-entry discovery and declaration output.