How to add number of days to today's date? [duplicate]
I need to be able to add 1, 2 , 5 or 10 days to today's date using jQuery.
You can use JavaScript, no jQuery required:
var someDate = new Date();
var numberOfDaysToAdd = 6;
var result = someDate.setDate(someDate.getDate() + numberOfDaysToAdd);
console.log(new Date(result))
This is for 5 days:
var myDate = new Date(new Date().getTime()+(5*24*60*60*1000));
You don't need JQuery, you can do it in JavaScript, Hope you get it.