How could I do arithmetic on a `DateTimePeriod`? I...
# kotlinx-datetime
k
How could I do arithmetic on a
DateTimePeriod
? I want to figure out how many
DateTimeUnit
a
DateTimePeriod
is composed of, for example. I would hope/think something like this would be available but I’m not sure if it’s explicitly omitted.
Copy code
val period = someInstant.periodUntil(otherInstant)
val unit = DateTimeUnit.MINUTE * 30

return period.div(unit) // Not available.
Never mind, Instant.until is what I want!