I need to make a function in scala that, given a range of dates, gives me a list of the range. I am relatively new in Scala and I am not able to figure out how to write the righ
Use Lamma Date
$ scala -cp lamma_2.11-1.1.2.jar
Welcome to Scala version 2.11.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_25).
Type in expressions to have them evaluated.
Type :help for more information.
scala> import io.lamma.Date
import io.lamma.Date
scala> Date(2015, 7, 7) to Date(2015, 7, 10) foreach println
Date(2015,7,7)
Date(2015,7,8)
Date(2015,7,9)
Date(2015,7,10)
This DateRange
is evaluated in a lazy way. Feel free to construct a date range of 5000 years. :)