# Feature catalog — date-fns/date-fns

> Canonical page: https://codevetter.com/unpack/date-fns/feature-catalog

# Feature catalog — date-fns/date-fns

Scanned commit 717ce0a807ea4c6b540d015b5c408723175b2838 (2026-09-22). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The primary user surface is a broad collection of date APIs, with individual imports and functional-programming variants. Formatting and parsing combine Unicode-style tokens with locale-specific behavior. Calendar operations and interval enumeration preserve date-extension context. Companion packages expose UTC and arbitrary-zone dates, while repository examples and documentation tooling support integration and publication.
- Calendar APIs include addition, subtraction, calendar differences, predicates, and start/end boundaries; addMonths clamps dates to the destination month's last day. — [pkgs/core/src/index.ts#L3-L41](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/src/index.ts#L3-L41) [pkgs/core/src/index.ts#L215-L241](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/src/index.ts#L215-L241) [pkgs/core/src/addMonths/index.ts#L69-L99](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/src/addMonths/index.ts#L69-L99)
- format supports escaped literals, localized P/p expansion, locale preprocessing, and token dispatch; formatDate is an alias. — [pkgs/core/src/format/index.ts#L48-L49](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/src/format/index.ts#L48-L49) [pkgs/core/src/format/index.ts#L374-L415](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/src/format/index.ts#L374-L415) [pkgs/core/src/format/index.ts#L423-L441](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/src/format/index.ts#L423-L441)
- parse consumes text against a format and reference date, rejects incompatible token combinations, permits trailing whitespace, and validates setters before returning a date. — [pkgs/core/src/parse/index.ts#L361-L389](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/src/parse/index.ts#L361-L389) [pkgs/core/src/parse/index.ts#L432-L468](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/src/parse/index.ts#L432-L468) [pkgs/core/src/parse/index.ts#L494-L531](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/src/parse/index.ts#L494-L531)
- eachDayOfInterval returns cloned midnight dates inclusively, supports reversed intervals and negative steps, and returns an empty array for a zero step. — [pkgs/core/src/eachDayOfInterval/index.ts#L73-L95](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/src/eachDayOfInterval/index.ts#L73-L95)
- formatDistance selects localized second-to-year phrases using elapsed time and offset correction; locale objects also supply relative formats, long formats, localization, and parsing matches. — [pkgs/core/src/formatDistance/index.ts#L123-L175](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/src/formatDistance/index.ts#L123-L175) [pkgs/core/src/formatDistance/index.ts#L183-L205](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/src/formatDistance/index.ts#L183-L205) [pkgs/core/src/locale/en-US/index.ts#L16-L26](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/src/locale/en-US/index.ts#L16-L26)
- The FP surface curries functions with reversed arguments; generated WithOptions variants retain the options argument, while @pure false functions are skipped. — [pkgs/core/src/fp/_lib/convertToFP/index.ts#L15-L24](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/src/fp/_lib/convertToFP/index.ts#L15-L24) [pkgs/core/scripts/build/fp.ts#L29-L48](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/scripts/build/fp.ts#L29-L48) [pkgs/core/scripts/build/fp.ts#L62-L65](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/scripts/build/fp.ts#L62-L65)
- Time-zone APIs provide tz/utc context factories, zone conversion preserving timestamps, UTC offsets, offset-change scanning, and four zone-name styles. — [pkgs/tz/src/tz/index.ts#L3-L13](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/tz/src/tz/index.ts#L3-L13) [pkgs/utc/src/utc/index.ts#L3-L12](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/utc/src/utc/index.ts#L3-L12) [pkgs/tz/src/date/index.js#L79-L86](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/tz/src/date/index.js#L79-L86) [pkgs/tz/src/tzScan/index.ts#L14-L36](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/tz/src/tzScan/index.ts#L14-L36) [pkgs/tz/src/tzName/index.ts#L4-L25](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/tz/src/tzName/index.ts#L4-L25)
- Maintainer-facing features include documentation publication and --rollback; integration examples display yyyy-MM-dd in React and log UTC TZDate representations in the playground. — [pkgs/docs/src/bin.ts#L30-L67](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/docs/src/bin.ts#L30-L67) [pkgs/core/examples/vite/src/App.tsx#L4-L12](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/examples/vite/src/App.tsx#L4-L12) [pkgs/tz/playground/src/browser.ts#L1-L6](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/tz/playground/src/browser.ts#L1-L6)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
