Skip to content

Instantly share code, notes, and snippets.

@iskigow
Created October 18, 2016 19:44

Revisions

  1. iskigow created this gist Oct 18, 2016.
    10 changes: 10 additions & 0 deletions jodaTimeWithGroovyError.groovy
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    @Grab(group="joda-time", module="joda-time", version="2.0")

    import org.joda.time.LocalDate

    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')}"
    }