http://tommyhu.cn/moment-in-nodejs/
Get the last day of the month
To=using.moment (date). EndOf (' month '). Format ("YYYY-MM-DD") + "23:59:59";
Get the date of the first one weeks
From=using.moment (date). Add (' Days ',-6). Format ("YYYY-MM-DD") + "00:00:00";
Node
var moment = require (' moment ');
Moment (). Add (' Days ', 2). Fromnow ();
' In 2 days '
Moment (). Subtract (' Days ', 2). Fromnow ();
' 2 days ago '
Moment (' November 1977 '). Fromnow ()
' Years ago '
Moment (). Add (' Days ', 2). Calendar ();
' Monday at 9:00am '
Moment (). Subtract (' Days ', 2). Calendar ();
' Last Thursday at 9:00AM '
Moment (' 1977-08-20 14:29:00 UTC '). Format (' MMM. D, YYYY ');
' 5, 1977 '
Moment (' 1977-08-20 14:29:00 UTC '). Fromnow ();
' Il y a années '
Moment (). Add (' months ', 1). Date (0);
Moment (Year-month-day). EndOf (' month ');
Moment.js (moment-in-node.js) Gets the last day of the month without specifying