← Docs
kotlin-stdlib / kotlin.time / Duration / minus

minus

Common
JVM
JS
Native
1.0
operator fun minus ( other : Duration ) : Duration
(source)

Returns a duration whose value is the difference between this and other duration values.

Exceptions

IllegalArgumentException - if the operation results in an undefined value for the given arguments, e.g. when subtracting infinite durations of the same sign.

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .