var
を避けるシリーズ.
import java.time.LocalDate
def dates(fromInclusive: LocalDate, toExclusive: LocalDate): Seq[LocalDate] =
Stream.iterate(fromInclusive)(_.plusDays(1)).takeWhile(_.compareTo(toExclusive) < 0)
More than 5 years have passed since last update.
var
を避けるシリーズ.
import java.time.LocalDate
def dates(fromInclusive: LocalDate, toExclusive: LocalDate): Seq[LocalDate] =
Stream.iterate(fromInclusive)(_.plusDays(1)).takeWhile(_.compareTo(toExclusive) < 0)
Register as a new user and use Qiita more conveniently