Member-only story

Migrating away from momentJS

I had to lead the migration from moment to date-fns, here is my experience

Rémy Villulles
4 min readApr 14, 2022
Photo by Tima Miroshnichenko: https://www.pexels.com/photo/analog-clock-in-macro-photography-7033891/

Some time ago, the momentJS team decided to move their library to maintenance mode, meaning that they are not going to push any new feature anymore. Only bug/security fixes.

My company tries to keep up with the latest technologies and avoid a maximum the tech depts, which is why they decided lately to move away from momentJS. I took care of this process, let me tell you how it went.

Choosing the right library

The first step was about picking the right library for us. Migrating from a date library to another is not an easy thing and we don’t want to do it again anytime soon.

By having a look, I could identify three libraries that could be interesting which are:

  • Date-fns
  • DayJS
  • Luxon

Those three libraries are interesting for the following reasons:

  • A decent amount of stars on Github
  • A large enough community (Easier when looking for help on Stackoverflow)
  • An active development
  • Usage of modern JS

--

--

Rémy Villulles
Rémy Villulles

Written by Rémy Villulles

Fullstack developer, I love learning new technologies and try to stay up to date with the newest features

Responses (1)