Subtracts this object from the specified temporal object.
!(p)
Subtracts the amount from the specified temporal object using the logic
encapsulated _in the implementing class.
!(p)
There are two equivalent ways of using this method.
The first is to invoke this method directly.
The second is to use {@link Temporal#minus(TemporalAmount)}:
!(pre)
// these two lines are equivalent, but the second approach is recommended
dateTime = amount.subtractFrom(dateTime);
dateTime = dateTime.minus(amount);
</pre>
It is recommended to use the second approach, {@code minus(TemporalAmount)},
as it is a lot clearer to read _in code.
@implSpec
The implementation must take the input object and subtract from it.
The implementation defines the logic of the subtraction and is responsible for
documenting that logic. It may use any method on {@code Temporal} to
query the temporal object and perform the subtraction.
The returned object must have the same observable type as the input object
!(p)
The input object must not be altered.
Instead, an adjusted copy of the original must be returned.
This provides equivalent, safe behavior for immutable and mutable temporal objects.
!(p)
The input temporal object may be _in a calendar system other than ISO.
Implementations may choose to document compatibility with other calendar systems,
or reject non-ISO temporal objects by {@link TemporalQueries#chronology() querying the chronology}.
!(p)
This method may be called from multiple threads _in parallel.
It must be thread-safe when invoked.
@param temporal the temporal object to subtract the amount from, not null
@return an object of the same observable type with the subtraction made, not null
@throws DateTimeException if unable to subtract
@throws ArithmeticException if numeric overflow occurs
Subtracts this object from the specified temporal object. !(p) Subtracts the amount from the specified temporal object using the logic encapsulated _in the implementing class. !(p) There are two equivalent ways of using this method. The first is to invoke this method directly. The second is to use {@link Temporal#minus(TemporalAmount)}: !(pre) // these two lines are equivalent, but the second approach is recommended dateTime = amount.subtractFrom(dateTime); dateTime = dateTime.minus(amount); </pre> It is recommended to use the second approach, {@code minus(TemporalAmount)}, as it is a lot clearer to read _in code.
@implSpec The implementation must take the input object and subtract from it. The implementation defines the logic of the subtraction and is responsible for documenting that logic. It may use any method on {@code Temporal} to query the temporal object and perform the subtraction. The returned object must have the same observable type as the input object !(p) The input object must not be altered. Instead, an adjusted copy of the original must be returned. This provides equivalent, safe behavior for immutable and mutable temporal objects. !(p) The input temporal object may be _in a calendar system other than ISO. Implementations may choose to document compatibility with other calendar systems, or reject non-ISO temporal objects by {@link TemporalQueries#chronology() querying the chronology}. !(p) This method may be called from multiple threads _in parallel. It must be thread-safe when invoked.
@param temporal the temporal object to subtract the amount from, not null @return an object of the same observable type with the subtraction made, not null @throws DateTimeException if unable to subtract @throws ArithmeticException if numeric overflow occurs