I am trying to manipulate a javascript date object, to increment it by one day:
var now = new Date(+1 day);
What are the javascript options for something like this...
EDIT: cheers
I am trying to manipulate a javascript date object, to increment it by one day:
var now = new Date(+1 day);
What are the javascript options for something like this...
EDIT: cheers
Like this:
var now = new Date();
now.setDate(now.getDate() + 1);
setDate
will correctly convert January 32 into February 1.
Like this:
var myDate=new Date();
myDate.setDate(myDate.getDate()+1);
setDate will increase the current date with 1, hope this will help.
Some straightforward answers have been posted, but just do you know, W3Schools has a fantastic Javascript date object reference page.