Encountered in writing project, for some time, the processing of code to write is very inconvenient, processing up to struggle, and then use JavaScript date library, with some good things in front of Daniel summary, like the icing on the cake, the work of saving a most of the time, when have free time can also go to it carefully, There are three common JavaScript date libraries that are recommended today.
1: my Moment
Star: momentjs.com/ GitHub Address: github.com/moment/mome…
Moment.js is a JavaScript date library (NPM package for time formatting) that can be used to parse, verify, manipulate, and display dates.
Advantages:
Independent of any third-party library support string, Date, timestamp and array formats can be used in the browser and Node environment at the same time, the document is also very detailed to facilitate the operation of time in daily development, improve the development efficiency
#####2: dayjs star: 27.1k day.js.org/ GitHub: github.com/iamkun/dayj…
#####3: date-fns star: 22.3k Website address: date-fns.org GitHub: github.com/date-fns/da…
Ate – FNS, a modern JavaScript date utility library. Date-fns provides the most comprehensive, simple, and consistent set of tools for manipulating JavaScript dates in browsers and Node.js.