Return to Snippet

Revision: 11397
at February 4, 2009 04:54 by narkisr

Initial Code
def cal = Calendar.instance
def ghday = cal.time
def spring = cal.time
def days = (ghday..spring).size()
println "Between Feb 2 and Mar 21, there are $days days" 
// will print Between Feb 2 and Mar 21, there are 48 days

Initial URL

Initial Description
Groovy ranges works on dates also!

Initial Title
Groovy date ranges

Initial Tags
date, groovy

Initial Language