Open
Description
Quoting https://kotlinlang.org/api/kotlinx-datetime/kotlinx-datetime/kotlinx.datetime/period-until.html:
All components of the
DateTimePeriod
returned are [...] positive or zero if this instant is earlier than the other.
val tz = TimeZone.of("Europe/Berlin")
println(
LocalDateTime(2025, 3, 29, 2, 30).toInstant(tz).periodUntil(
LocalDateTime(2025, 3, 30, 3, 10).toInstant(tz), tz))
// P1DT-20M
Runnable: https://pl.kotl.in/LedZ6Njqf