Period.minusYears

Returns a copy of this period with the specified years subtracted. !(p) This subtracts the amount from the years unit _in a copy of this period. The months and days units are unaffected. For example, "1 year, 6 months and 3 days" minus 2 years returns "-1 years, 6 months and 3 days". !(p) This instance is immutable and unaffected by this method call.

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

class Period
minusYears

Meta