Skip to content

Commit

Permalink
iii_conventions/_27_Range_To
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Lotz committed Jan 15, 2018
1 parent eb2b021 commit 50d137b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/iii_conventions/MyDate.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ data class MyDate(val year: Int, val month: Int, val dayOfMonth: Int) : Comparab
}
}

operator fun MyDate.rangeTo(other: MyDate): DateRange = todoTask27()
operator fun MyDate.rangeTo(other: MyDate): DateRange = DateRange(this, other)

enum class TimeInterval {
DAY,
Expand Down
3 changes: 1 addition & 2 deletions src/iii_conventions/n27RangeTo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ fun todoTask27(): Nothing = TODO(
)

fun checkInRange2(date: MyDate, first: MyDate, last: MyDate): Boolean {
todoTask27()
// return date in first..last
return date in first..last
}

0 comments on commit 50d137b

Please sign in to comment.