Skip to content

Instantly share code, notes, and snippets.

@belenaj
Last active July 27, 2019 08:18
Show Gist options
  • Save belenaj/bef3e606ade2d16158ab440990ca91b4 to your computer and use it in GitHub Desktop.
Save belenaj/bef3e606ade2d16158ab440990ca91b4 to your computer and use it in GitHub Desktop.
// ...
def DAYS_BACK = 30
def iterDate = new Date() - DAYS_BACK
def newDateParse
for (i=0; i <DAYS_BACK; i++) {
iterDate = iterDate + 1
newDateParse = iterDate.format("yyyy-MM-dd")
stage("newDateParsed ${newDateParse}") {
// do your stuff here
}
}
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment