elect
09/17/2021, 8:45 AMkotlin.time.Duration
from something like d-hh:mm:ss
?
Combining d.toDuration(DAYS) + hh.toDuration(HOURS)
and so on?
If yes, I find java Duration
better in this regards, because you can parse it from a `String`: Duration.parse("..")
Joffrey
09/17/2021, 8:49 AMDuration.parse
and Duration.parseIsoString
methods on Kotlin's Duration, but they only support specific formats for now (not custom). You need to pass an ISO string such as P1DT13H
, or something more human friendly that's the output of Kotlin Duration.toString()
like 1h 30m
elect
09/17/2021, 8:50 AMJoffrey
09/17/2021, 8:51 AMelect
09/17/2021, 8:51 AMJoffrey
09/17/2021, 8:52 AMelect
09/17/2021, 8:52 AMJoffrey
09/17/2021, 8:52 AMelect
09/17/2021, 8:53 AMJoffrey
09/17/2021, 1:28 PMbuildSrc
code which is kind of a plugin too)