Migrating from MomentJS to DayJS

Amit Joki
1 min readJun 18, 2020

--

In the third Bi-Weekly report I am writing for the Google Summer of Code, I’ll be talking about the migrating awway from MomentJS.

MomentJS has been the go-to library in the JavaScript community whenever there’s a need to manipulate and play around with dates.

The native Date APIs not sufficing, MomentJS became a legit star. But is it still the same star it was back when it was first launched, which is nearly 4 years ago?

Seems like the answer is no. This awesome Github repository — https://github.com/you-dont-need/You-Dont-Need-Momentjs makes valid arguments which I am not going to repeat here.

Our current codebase at WikiEduDashboard uses the MomentJS but I have been working to migrate it to the modern star — DayJS. DayJS is modular. The core is small and if you need additional features, you can always plug and play.

A proper migration from MomentJS to DayJS should give you nearly 10x reduction in the bundle size.

The migration is still in progress and I should have the numbers in my next weekly report.

--

--