Skip to Content
Getting StartedInstallation

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 install rosetta-date

Requirements

  • Node ≥ 22.
  • An ESM project. import the package — it ships as ESM only and cannot be require()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

ImportWhat it provides
rosetta-dateconvert, createConverter, describe, explain, defineDialect, defineLibrary, Canonical, and the error/option types
rosetta-date/dialectsThe built-in dialects and getDialect
rosetta-date/librariesThe built-in libraries and getLibrary
rosetta-date/intlThe Intl.DateTimeFormat adapter — toIntlOptions / fromIntlOptions

Continue to the Quick start to make your first conversion.

Last updated on