Answers for "js date addd days"

5

js date add 1 day

let date = new Date();
// add a day
date.setDate(date.getDate() + 1);
Posted by: Guest on June-08-2020
0

javascript add days

Date.prototype.addDays = function(days) {
    var date = new Date(this.valueOf());
    date.setDate(date.getDate() + days);
    return date;
}
Posted by: Guest on April-20-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language