age

fun LocalDateTime?.age(timeZone: TimeZone): Duration

The elapsed Duration from this date-time until now, interpreting the receiver in timeZone, or Duration.ZERO if the receiver is null.

Extension function on a nullable LocalDateTime.

Return

the age, or Duration.ZERO when the receiver is null

Parameters

timeZone

the zone used to convert this local date-time to an Instant


The elapsed Duration from this instant until now, or Duration.ZERO if the receiver is null.

Extension property on a nullable Instant.