Share via


Calendar.NumberOfYearsInThisEra Property

Definition

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

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

Property Value

Int32

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.

Applies to

See also