Duration.minus

Returns a copy of this duration with the specified duration subtracted. !(p) This instance is immutable and unaffected by this method call.

@param duration the duration to subtract, positive or negative, not null @return a {@code Duration} based on this duration with the specified duration subtracted, not null @throws ArithmeticException if numeric overflow occurs

  1. Duration minus(Duration duration)
    class Duration
  2. Duration minus(long amountToSubtract, TemporalUnit unit)

Meta