Add a toString method and ability to get value and units
dalewking opened this issue · 0 comments
dalewking commented
So TimeUnit should have a toString that returns a string like "days" or "minutes"
Interval should have a toString that returns a string like "15 seconds"
Interval should have properties for the actual value and TimeUnit:
val a = 15.minutes
val b = a.value // == 15
val c = a.unit // == Minute
val d = a.unit.toString() // == "15 minutes"
This is more for debugging/logging purposes than application output so internationalization is not an issue