web-utilities-date-fns
Installation
SKILL.md
date-fns Date Utility Patterns
Quick Guide: date-fns is a tree-shakeable set of pure functions — each returns a new
Dateand nothing mutates. Parse withparseISOfor ISO strings orparsefor custom formats, then checkisValid, because v4 returns Invalid Date where v3 threw. Format tokens are Unicode TR35 (yyyy,dd,EEEE) and differ from Moment's. Timezone support lives in a companion package whose name depends on the major version.
Detailed Resources:
- examples/core.md — formatting, parsing with validation, arithmetic, boundaries, preset ranges
- examples/timezone.md — TZDate, the
inoption,transpose, DST detection, UTC classes - examples/i18n.md — locale maps, localized month and weekday names, week start days
- examples/relative.md — distances, durations, relative-vs-absolute display
- examples/comparison.md — comparisons, interval generation, overlap detection, validation
- reference.md — format token table, function index, v4 breaking changes, Moment migration table