Answers for "js new date add 1 day"

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

php jquery plus 1 day

var date = new Date();

// add a day
date.setDate(date.getDate() + 1);
Posted by: Guest on August-28-2020
2

javascript date add days

function addDays(originalDate, days){
  cloneDate = new Date(originalDate.valueOf());
  cloneDate.setDate(cloneDate.getDate() + days);
  return cloneDate;
}

let appointment = new Date("February 12, 2021 00:00:00");
let newAppointment = addDays(appointment, 7);

console.log(appointment.getDate()); // 12
console.log(newAppointment.getDate()); // 19
Posted by: Guest on February-28-2021
0

new date with date + 1

var date = new Date();

// add a day
date.setDate(date.getDate() + 1);
Posted by: Guest on October-11-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language