kxjtime / com.sandjelkovic.kxjtime / java.time.Duration

Extensions for java.time.Duration

after

infix fun Duration.after(zonedDateTime: ZonedDateTime): ZonedDateTime

Add the Duration to ZonedDateTime

infix fun Duration.after(instant: Instant): Instant

Add the Duration to Instant

infix fun Duration.after(time: LocalDateTime): LocalDateTime

Add the Duration to LocalDateTime

and

infix fun Duration.and(other: Duration): Duration

Add two durations

before

infix fun Duration.before(zonedDateTime: ZonedDateTime): ZonedDateTime

Subtract the Duration from ZonedDateTime

infix fun Duration.before(instant: Instant): Instant

Subtract the Duration from Instant

infix fun Duration.before(time: LocalDateTime): LocalDateTime

Subtract the Duration from LocalDateTime

unaryMinus

operator fun Duration.unaryMinus(): Duration

Returns a copy of this duration with the length negated.