Created
June 25, 2020 16:43
-
-
Save richard-gibson/7efc760d20fec25cfe09fd4d14db867b 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
data class Location(val location: String, val since: String, val till: String) | |
val searchDate = LocalDate.now() | |
locations.filter { location -> | |
searchDate.isAfter(LocalDate.parse(location.since, DateTimeFormatter.ISO_DATE)) && | |
searchDate.isBefore(LocalDate.parse(location.since, DateTimeFormatter.ISO_DATE)) | |
}.groupBy { it.location } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment