Period.MinusYears(Int64) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a copy of this period with the specified years subtracted.
[Android.Runtime.Register("minusYears", "(J)Ljava/time/Period;", "", ApiSince=26)]
public Java.Time.Period? MinusYears(long yearsToSubtract);
[<Android.Runtime.Register("minusYears", "(J)Ljava/time/Period;", "", ApiSince=26)>]
member this.MinusYears : int64 -> Java.Time.Period
Parameters
- yearsToSubtract
- Int64
the years to subtract, positive or negative
Returns
a Period based on this period with the specified years subtracted, not null
- Attributes
Remarks
Returns a copy of this period with the specified years subtracted. 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". This instance is immutable and unaffected by this method call.
Java reference for java.time.Period.minusYears.