Skip to content

Instantly share code, notes, and snippets.

@tomtobac
Created September 23, 2016 15:55
Show Gist options
  • Save tomtobac/53d49b6a41971377cb0907aa0d403ce6 to your computer and use it in GitHub Desktop.
Save tomtobac/53d49b6a41971377cb0907aa0d403ce6 to your computer and use it in GitHub Desktop.
for(let i = 0; i < 25; i++){
let date = new Date()
date.setDate(date.getDate() - i)
console.log(date.toISOString().slice(0, 10))
}
// new Date('2016-05-23')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment