Sdílet prostřednictvím


Period.Years Property

Definition

Gets the amount of years of this period.

public int Years { [Android.Runtime.Register("getYears", "()I", "", ApiSince=26)] get; }
[<get: Android.Runtime.Register("getYears", "()I", "", ApiSince=26)>]
member this.Years : int

Property Value

the amount of years of this period, may be negative

Attributes

Remarks

Gets the amount of years of this period.

This returns the years unit.

The months unit is not automatically normalized with the years unit. This means that a period of "15 months" is different to a period of "1 year and 3 months".

Java documentation for java.time.Period.getYears().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to