Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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));
 
PREVIOUS NEXT
Tagged: #add #hours #date #timestamp #js
ADD COMMENT
Topic
Name
8+3 =