subtract method
Subtracts the specified period from this time. Fluent alternative to operator-()
.
period
: The period to subtract. Must not contain any (non-zero) date units.
Returns: The result of subtracting the given period from this time.
Implementation
LocalTime subtract(Period period) {
Preconditions.checkNotNull(period, 'period');
Preconditions.checkArgument(!period.hasDateComponent, 'period', "Cannot subtract a period with a date component from a time");
return IPeriod.addTimeTo(period, this, -1);
}