Skip to content

Commit

Permalink
have a nice toString()
Browse files Browse the repository at this point in the history
  • Loading branch information
angryziber committed Jan 3, 2017
1 parent 56408d0 commit 8920ed5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/geotag/timeline/TimeSpan.kt
Expand Up @@ -4,7 +4,7 @@ import java.time.Duration
import java.time.Duration.between
import java.time.Instant

class TimeSpan(val begin: Instant, val end: Instant) {
data class TimeSpan(val begin: Instant, val end: Instant) {
val duration: Duration get() = between(begin, end)
fun matches(dateTime: Instant) = begin <= dateTime && end >= dateTime
}

0 comments on commit 8920ed5

Please sign in to comment.