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

◆ ToFourDigitYear()

override int System.Globalization.PersianCalendar.ToFourDigitYear ( int year)
inlinevirtual

Reimplemented from System.Globalization.Calendar.

Definition at line 301 of file PersianCalendar.cs.

302 {
303 if (year < 0)
304 {
305 throw new ArgumentOutOfRangeException("year", year, SR.ArgumentOutOfRange_NeedNonNegNum);
306 }
307 if (year < 100)
308 {
309 return base.ToFourDigitYear(year);
310 }
311 if (year > 9378)
312 {
313 throw new ArgumentOutOfRangeException("year", year, SR.Format(SR.ArgumentOutOfRange_Range, 1, 9378));
314 }
315 return year;
316 }

References System.SR.ArgumentOutOfRange_NeedNonNegNum, System.SR.ArgumentOutOfRange_Range, System.SR.Format(), and System.year.