Here you can find the source of addWeeks(w)
Date.prototype.addWeeks = function(w) { this.addDays(w * 7);/*from w ww .j av a2 s.c om*/ }; Date.prototype.addDays = function(d) { this.setDate(this.getDate() + d); };
Date.prototype.addWeeks = function(value) { this.addDays(value * 7); return this; };
Date.prototype.addWeeks = function(w)
this.addDays(w * 7);
};