So, Why Not Just Use Moment.js? Moment.js is a fantastic library for working with dates in JavaScript — it has many great features and offers a whole host of useful utilities. It is, however, is not without its critics.
Many people cite the fact that Moment objects are mutable (i.e. operations like add, or subtract change the original Moment object) as being confusing for developers and a source of bugs.
https://date-fns.org/
https://github.com/date-fns/date-fns
review - https://www.sitepoint.com/date-fns-javascript-date-library
origin - https://www.pipiscrew.com/?p=19084 date-fns-lightweight-javascript-date-library