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
Since Scala is a functional, go with a recursion:
def calculateDates(from: LocalDate, until: LocalDate): Seq[LocalDate] = { if from.compareTo(until) > 1 return[] else return from :: calculateDates(from.plusDays(1), until) }