Answers for "add 2 for hours in date timestamp js"

0

add 2 for hours in date timestamp js

Date.prototype.addHours= function(h){
    this.setHours(this.getHours()+h);
    return this;
}

alert(new Date().addHours(4));
Posted by: Guest on September-22-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language