OffsetTime.minus

Returns a copy of this time with the specified amount subtracted. !(p) This returns an {@code OffsetTime}, based on this one, with the amount _in terms of the unit subtracted. If it is not possible to subtract the amount, because the unit is not supported or for some other reason, an exception is thrown. !(p) This method is equivalent to {@link #plus(long, TemporalUnit)} with the amount negated. See that method for a full description of how addition, and thus subtraction, works. !(p) This instance is immutable and unaffected by this method call.

@param amountToSubtract the amount of the unit to subtract from the result, may be negative @param unit the unit of the amount to subtract, not null @return an {@code OffsetTime} based on this time with the specified amount subtracted, not null @throws DateTimeException if the subtraction cannot be made @throws UnsupportedTemporalTypeException if the unit is not supported @throws ArithmeticException if numeric overflow occurs

  1. OffsetTime minus(TemporalAmount amountToSubtract)
  2. OffsetTime minus(long amountToSubtract, TemporalUnit unit)
    class OffsetTime

Meta