Calendar.NumberOfYearsInThisEra Calendar.NumberOfYearsInThisEra Calendar.NumberOfYearsInThisEra Calendar.NumberOfYearsInThisEra Calendar.NumberOfYearsInThisEra Property

Definition

Gets the number of years in the current era of this Calendar object.

public : int NumberOfYearsInThisEra { get; }
int32_t NumberOfYearsInThisEra();
public int NumberOfYearsInThisEra { get; }
Public ReadOnly Property NumberOfYearsInThisEra As int
var int = calendar.numberOfYearsInThisEra;

Property Value

int int int

The number of years in the current era, or – 1 if there is no known bound to the number of years in the current era.

Remarks

Note

This API is being updated to support the May 2019 Japanese era change. If your application supports the Japanese calendar, you should validate that it properly handles the new era. See Prepare your application for the Japanese era change for more information.