I need to increment a date value by one day in JavaScript.
For example, I have a date value 2010-09-11 and I need to store the date of the next day in a JavaScript v
Two methods:
1:
var a = new Date() // no_of_days is an integer value var b = new Date(a.setTime(a.getTime() + no_of_days * 86400000)
2: Similar to the previous method
var a = new Date() // no_of_days is an integer value var b = new Date(a.setDate(a.getDate() + no_of_days)