Skip to content

Instantly share code, notes, and snippets.

@tejastank
Created June 25, 2012 07:26
Show Gist options
  • Save tejastank/2987156 to your computer and use it in GitHub Desktop.
Save tejastank/2987156 to your computer and use it in GitHub Desktop.
javascript : date add days
dd = new Date();
dd.setDate(dd.getDate()+14); // this works as expected.
or below code :
var today = new Date();
var nextweek = new Date(today.getFullYear(), today.getMonth(), today.getDate()+7);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment