You-Dont-Need-Momentjs
You-Dont-Need-Momentjs copied to clipboard
Sometimes there is no alternative to Moment.js
Moment.js can be still a useful (and perhaps even the only) library.
JavaScript is a widely used language, not only used by web-browsers.
Most alternative libraries require access to the internet in order to connect to the IANA timezone database and/or rely on Intl
Object.
When you use for example mongo shell then
- you don't have connection to the internet
- the shell does not support
Intl
object. The newmongosh
is still in beta-phase - you don't care about a 300k library. With MongoDB scripts you process much larger documents. Other popular libraries like Node.js or mongoose are even larger.
I am really happy that moment.js is still maintained. So far I did not find any suitable alternative library.
According to their own docs, the maintenance is minimal: https://momentjs.com/docs/ (I would have called it life-support)