Created
September 17, 2014 13:07
-
-
Save ryoppy/a996d3c9438d7717f9a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def interval2seq(in: Interval): Seq[DateTime] = { | |
@tailrec | |
def f(t: DateTime, acum: Seq[DateTime]): Seq[DateTime] = if (in.contains(t)) f(d.plusDay(1), t +: acum) else acum.reverse | |
f(in.start, Nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment