durationFromNowText

fun durationFromNowText(instant: Instant, now: Instant = Clock.System.now()): String

Format time interval to the time instant in human-readable way, such as "3 days and 5 hours ago" or "4 months and 3 days from now".

Parameters

instant

time instant in the past or future.

now

time now, only exposed for testing.