Answers for "js date add 15 days"

1

javascript current date add 30 days

var future = new Date();
future.setDate(future.getDate() + 30);
Posted by: Guest on April-26-2020
10

javascript add day to date

function addDays(date, days) {
  var result = new Date(date);
  result.setDate(result.getDate() + days);
  return result;
}
Posted by: Guest on May-17-2020
0

typescript add days to date

addDays(days : number): Date{
  var futureDate = new Date();
  futureDate.setDate(futureDate.getDate() + days);
  return futureDate;
}
Posted by: Guest on August-17-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