Skip to content

Instantly share code, notes, and snippets.

@robpurcell
Created January 12, 2014 22:11
Show Gist options
  • Save robpurcell/8391335 to your computer and use it in GitHub Desktop.
Save robpurcell/8391335 to your computer and use it in GitHub Desktop.
Iterate through days in a Joda-Time Interval using Groovy
DateTime.metaClass.next << { -> delegate.plusDays(1) }
Interval interval = ...
def start = interval.start
def finish = interval.end
for (day in start..finish) {
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment