mmntjs
Compatibility-first migration bridge away from moment.js

Docs

Getting Started

Choose the lowest-risk way to evaluate mmntjs in an existing moment.js codebase.

Guidance

Start With The Smallest Credible Evaluation

The first goal is not to rewrite date logic. The first goal is to confirm that one owned part of the system can switch without surprising behavior drift.

That usually means choosing one module with clear tests, limited timezone complexity, and an owner who can judge whether the resulting behavior still matches production expectations.

  • Pick one low-risk module or service boundary.
  • Run the existing test suite before adding migration helpers.
  • Review known differences before broadening scope.

What Success Looks Like

A successful first evaluation is boring: imports are replaced, tests still pass, a few targeted date fixtures compare cleanly, and the team gains confidence about where to expand next.

Examples

Zero-code alias trial

npm install moment@npm:mmntjs

Useful when you want the smallest possible trial surface before changing imports.

Coexistence mode

import moment from "moment";

// already migrated file
import mmnt from "mmntjs";

This lets one codebase move module by module instead of forcing a single cutoff day.

Migration tool rewrite

npm install mmntjs
mmntjs migrate --apply path/to/module

Use this when you want the tool to rewrite one owned surface while keeping the change reviewable.

First evaluation flow

npm test
# then compare one or two representative date fixtures in the chosen module

The important part is reusing the tests you already trust before inventing new migration scaffolding.

How To Use This Doc

Use this page as a migration review aid rather than as a generic tutorial. If the behavior in this area is business-critical, compare it directly against your current moment.js usage and record the outcome before expanding rollout.