List of utility methods to do Hour Add
addHours(hours)Date.prototype.addHours = function(hours) { this.setHours(this.getHours() + hours); return this; }; | |
addHours(n)Date.prototype.addHours = function(n) { this.setHours(this.getHours() + n) }
| |
addHours(numberOfHours)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; }; | |
addHours(numberOfHours)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; }; var str = ' something else '; var r = str.toTitleCase(); | |
AddHours(hours)Date.prototype.AddHours = function (hours) { return this.setHours(this.getHours() + hours); Date.prototype.Format = function (fmt) { var o = { "M+": this.getMonth() + 1, "d+": this.getDate(), "h+": this.getHours(), "m+": this.getMinutes(), ... |