RosettaCodeData/Task/Five-weekends/Groovy/five-weekends-3.groovy
2014-01-17 05:34:36 +00:00

4 lines
238 B
Groovy

def yearsWith = fiveWeekendMonths.collect { it.format('yyyy') as int } as Set
def yearsWithout = (years as Set) - yearsWith
println "\nNumber of years without a five weekend month: ${yearsWithout.size()}"
yearsWithout.each { println it }