Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ MaxEraCalendarYear()

int System.Globalization.EastAsianLunisolarCalendar.MaxEraCalendarYear ( int era)
inlinepackageinherited

Definition at line 106 of file EastAsianLunisolarCalendar.cs.

107 {
108 EraInfo[] calEraInfo = CalEraInfo;
109 if (calEraInfo == null)
110 {
111 return MaxCalendarYear;
112 }
113 if (era == 0)
114 {
115 era = CurrentEraValue;
116 }
117 if (era == GetEra(MaxDate))
118 {
120 }
121 for (int i = 0; i < calEraInfo.Length; i++)
122 {
123 if (era == calEraInfo[i].era)
124 {
125 return calEraInfo[i].maxEraYear;
126 }
127 }
128 throw new ArgumentOutOfRangeException("era", era, SR.ArgumentOutOfRange_InvalidEraValue);
129 }
int GetEra(DateTime time)

References System.SR.ArgumentOutOfRange_InvalidEraValue, System.Globalization.EastAsianLunisolarCalendar.CalEraInfo, System.Globalization.Calendar.CurrentEraValue, System.Globalization.Calendar.GetEra(), System.Globalization.EastAsianLunisolarCalendar.GetYear(), System.Globalization.EastAsianLunisolarCalendar.MaxCalendarYear, System.Globalization.EastAsianLunisolarCalendar.MaxDate, and System.Globalization.EraInfo.maxEraYear.

Referenced by System.Globalization.EastAsianLunisolarCalendar.CheckYearRange().