Installation
rosetta-date is in active development. Minor releases may include breaking changes. Pin an exact
version in your package.json and review the changelog before upgrading.
npm
npm install rosetta-dateRequirements
- Node ≥ 22.
- An ESM project.
importthe package — it ships as ESM only and cannot berequire()d.
rosetta-date has zero runtime dependencies and is fully tree-shakeable. The conversion API
lives at the package root, while dialects and libraries are imported from their own entrypoints —
so a build only pulls in the dialects and libraries you actually reference.
Entrypoints
| Import | What it provides |
|---|---|
rosetta-date | convert, createConverter, describe, explain, defineDialect, defineLibrary, Canonical, and the error/option types |
rosetta-date/dialects | The built-in dialects and getDialect |
rosetta-date/libraries | The built-in libraries and getLibrary |
rosetta-date/intl | The Intl.DateTimeFormat adapter — toIntlOptions / fromIntlOptions |
Continue to the Quick start to make your first conversion.
Last updated on