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
If you happen to use the Java 1.8 DateTime API (or its 1.7 backport threeten), then you could write
DateTime
def between(fromDate: LocalDate, toDate: LocalDate) = { fromDate.toEpochDay.until(toDate.toEpochDay).map(LocalDate.ofEpochDay) }