Here you can find the source of addHours(h)
// add methods addHours and addMinutes do Date Date.prototype.addHours= function(h){ this.setHours(this.getHours()+h);/*from ww w.j a v a2 s .com*/ return this; } Date.prototype.removeHours= function(h){ this.setHours(this.getHours()-h); return this; } Date.prototype.addMinutes = function (m) { this.setMinutes(this.getMinutes()+m); return this; } Date.prototype.removeMinutes= function(h){ this.setMinutes(this.getMinutes()-h); return this; }
Date.prototype.addHours = function(h) { this.setHours(this.getHours() + h); return this; Date.prototype.addSeconds = function(s) { this.setSeconds(this.getSeconds() + s); return this;
Date.prototype.addHours = function(h) { this.setTime(this.getTime() + (h*60*60*1000)); return this;
Date.prototype.addHours= function(h){ this.setHours(this.getHours()+h); return this; var d = new Date(); console.log(d.addHours(24));
Date.prototype.addHours = function (h) { this.setHours(this.getHours() + h); return this; Date.prototype.addDays = function (d) { var month, year, day; month = this.getMonth(); year = this.getFullYear(); day = this.getDate(); ...
Date.prototype.addHours = function (h) { this.setHours(this.getHours()+h); return this; };
Date.prototype.addHours = function(h) {
this.setHours(this.getHours() + h);
};
Date.prototype.addHours = function(hours) { this.setHours(this.getHours() + hours); return this; };
Date.prototype.addHours = function(n) { this.setHours(this.getHours() + n) }
Date.prototype.addHours = function (numberOfHours) { if (typeof numberOfHours !== 'number') throw new Error('Hours must be a number'); this.setTime(this.getTime() + (numberOfHours * 60 * 60 * 1000)); return this; };