minus

actual operator fun minus(duration: Duration): Instant(source)
actual operator fun minus(other: Instant): Duration(source)
expect operator fun minus(duration: Duration): Instant(source)

Returns an instant that is the result of subtracting the specified duration from this instant.

If the duration is positive, the returned instant is earlier than this instant. If the duration is negative, the returned instant is later than this instant.

The return value is clamped to the platform-specific boundaries for Instant if the result exceeds them.


expect operator fun minus(other: Instant): Duration(source)

Returns the Duration between two instants: other and this.

The duration returned is positive if this instant is later than the other, and negative if this instant is earlier than the other.

The result is never clamped, but note that for instants that are far apart, the value returned may represent the duration between them inexactly due to the loss of precision.

actual operator fun minus(duration: Duration): Instant(source)
actual operator fun minus(other: Instant): Duration(source)
actual operator fun minus(duration: Duration): Instant(source)
actual operator fun minus(other: Instant): Duration(source)