Node.js examples for Date:Day
Set day for Date
Date.prototype.setDay = function (day) { var d = this.getDay(); if (this.firstDayOfWeek == 1 && d == 0) { d = 7/*ww w . j a va 2 s . com*/ }; this.setDate(this.getDate()+(day-d)); }