This class library helps you effectively process related dates. Hope you like it!
Main features:
3.2kb ultra-lightweight
Independent class library, which means you do not need to add a bunch of JS
Date Processing supports UNIX timestamp, String, date in the specified format
Date Processing: Plus, minus date
Date display: including date display options for relative time display
Other built-in functions, such as Save, timezone offset, and i18n support
It can be used as a module of node. js.
Complete Document Introduction
How to use it?CopyCodeThe Code is as follows: var now = moment ();
Console. Log (now. Format ('dddd, Mmmm do yyyy, H: mm: SS '));
Copy codeThe Code is as follows: Ar Halloween = moment ([2011, 9, 31]); // October 31st
Console. Log (Halloween. fromnow ());
Copy codeThe Code is as follows: var now = moment (). Add ('days ', 9 );
Console. Log (now. Format ('dddd, Mmmm do yyyy '));
Copy codeThe Code is as follows: var now = moment (); moment. Lang ('Fr ');
Console. Log (now. Format ('llll '));
Moment_jb51.rar package download