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

◆ MinEraCalendarYear()

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

Definition at line 81 of file EastAsianLunisolarCalendar.cs.

82 {
83 EraInfo[] calEraInfo = CalEraInfo;
84 if (calEraInfo == null)
85 {
86 return MinCalendarYear;
87 }
88 if (era == 0)
89 {
90 era = CurrentEraValue;
91 }
92 if (era == GetEra(MinDate))
93 {
95 }
96 for (int i = 0; i < calEraInfo.Length; i++)
97 {
98 if (era == calEraInfo[i].era)
99 {
100 return calEraInfo[i].minEraYear;
101 }
102 }
103 throw new ArgumentOutOfRangeException("era", era, SR.ArgumentOutOfRange_InvalidEraValue);
104 }
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.MinCalendarYear, System.Globalization.EastAsianLunisolarCalendar.MinDate, and System.Globalization.EraInfo.minEraYear.

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