Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add date in javascript

Date.prototype.addDays = function(days) {
    var date = new Date(this.valueOf());
    date.setDate(date.getDate() + days);
    return date;
}

var date = new Date();

console.log(date.addDays(5));
 
PREVIOUS NEXT
Tagged: #add #date #javascript
ADD COMMENT
Topic
Name
1+1 =