java.time.Duration vs kotlin.time.Duration? Is there a good reason to prefer one over the other? I need to work with both those and Instants (which I don't think Kotlin has it's "own" version of yet, and java.time.Instant is still the goto there).
m
mkrussel
08/16/2023, 12:24 AM
There's a Kotlinx library for DateTime that has Instant and most of the classes in the java.time library. #kotlinx-datetime
The Kotlin Duration is a inline value class, so it might use less space. I haven't used the java version, so I cannot give much feedback with comparing them.
Going all Kotlin makes it easier to convert to multiplatform.