internal int MaxEraCalendarYear (int era) {
EraInfo[] mEraInfo = CalEraInfo;
//ChineseLunisolarCalendar does not has m_EraInfo it is going to retuen null
if (mEraInfo == null) {
return MaxCalendarYear;
}
if (era == Calendar.CurrentEra) {
era = CurrentEraValue;
}
//era has to be in the supported range otherwise we will throw exception in CheckEraRange()
if (era == GetEra(MaxDate)) {
return (GetYear(MaxCalendarYear, MaxDate));
}
for (int i = 0; i < mEraInfo.Length; i++) {
if (era == mEraInfo[i].era) {
return (mEraInfo[i].maxEraYear);
}
}
throw new ArgumentOutOfRangeException("era", Environment.GetResourceString("ArgumentOutOfRange_InvalidEraValue"));
}