Skip to Content
Getting StartedInstallation

Installation

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 ecosystems you actually reference.

Entrypoints

ImportWhat it provides
rosetta-dateconvert, createConverter, defineDialect, defineLibrary, Canonical, error and option types
rosetta-date/dialectsBuilt-in dialects (moment, ldml) and getDialect
rosetta-date/librariesBuilt-in libraries (momentjs, dayjs, dateFns) and getLibrary

Continue to the Quick start to make your first conversion.

Last updated on