LocalTime.minus

Returns a copy of this time with the specified amount subtracted. !(p) This returns a {@code LocalTime}, 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 a {@code LocalTime} 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. LocalTime minus(TemporalAmount amountToSubtract)
  2. LocalTime minus(long amountToSubtract, TemporalUnit unit)
    class LocalTime

Meta