Created
February 10, 2012 18:22
-
-
Save wfaler/1791448 to your computer and use it in GitHub Desktop.
continuous timeline to list of days
This file contains hidden or 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
| lazy val tradingDays: List[List[Price]] = prices.groupBy(price => { | |
| Days.daysBetween(price.dateTime, prices.last.dateTime) | |
| }).values.toList.sortWith((a,b) => a.head.dateTime.isBefore(b.head.dateTime)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment