Period.OfYears(Int32) 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.
Obtains a Period representing a number of years.
[Android.Runtime.Register("ofYears", "(I)Ljava/time/Period;", "", ApiSince=26)]
public static Java.Time.Period? OfYears(int years);
[<Android.Runtime.Register("ofYears", "(I)Ljava/time/Period;", "", ApiSince=26)>]
static member OfYears : int -> Java.Time.Period
Parameters
- years
- Int32
the number of years, positive or negative
Returns
the period of years, not null
- Attributes
Remarks
Obtains a Period representing a number of years. The resulting period will have the specified years. The months and days units will be zero.
Java reference for java.time.Period.ofYears.