Skip to content

Instantly share code, notes, and snippets.

@iskigow
Created October 18, 2016 19:45
Show Gist options
  • Save iskigow/d85114f61bf8212dd572a2b8018cdf1a to your computer and use it in GitHub Desktop.
Save iskigow/d85114f61bf8212dd572a2b8018cdf1a to your computer and use it in GitHub Desktop.
@Grab(group="joda-time", module="joda-time", version="2.0")
import org.joda.time.LocalDate
LocalDate.metaClass.next << { -> delegate.plusDays(1) }
def ini = new LocalDate(2012, 3, 1)
def fim = new LocalDate(2012, 3, 5)
for (dia in ini..fim) {
println "${dia.toString('dd-MM-yyyy')}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment