Skip to content

Instantly share code, notes, and snippets.

@hpatoio
Created November 17, 2012 22:06
Show Gist options
  • Save hpatoio/4100640 to your computer and use it in GitHub Desktop.
Save hpatoio/4100640 to your computer and use it in GitHub Desktop.
Add then day to a date
shiftDay = 10
var myDate = new Date();
myDate.setDate(myDate.getUTCDate() + shiftDay)
day = myDate.getUTCDate()
month = myDate.getUTCMonth()*1 + 1
year = myDate.getUTCFullYear()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment