6
javascript everyone in the development of front-end processing date and time will encounter problems, often brought a lot of handlers to complete a simple date and time display. Today I will give you a lightweight javascript date processing library: moment.js, with which you can easily solve the problem of front-end development for various date and time encountered.
moment.js not rely on any third-party libraries, support string, Date, time stamp, and an array of other formats, can be like PHP's date () function, the date and time formatting, calculation of relative time, access to a specific date and time after time, etc. and so on, this article has the following examples.