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

◆ IsValidDay()

override bool System.Globalization.GregorianCalendar.IsValidDay ( int year,
int month,
int day,
int era )
inlinepackagevirtual

Reimplemented from System.Globalization.Calendar.

Definition at line 217 of file GregorianCalendar.cs.

218 {
219 if ((era != 0 && era != 1) || year < 1 || year > 9999 || month < 1 || month > 12 || day < 1)
220 {
221 return false;
222 }
223 int[] array = ((year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)) ? DaysToMonth366 : DaysToMonth365);
224 return day <= array[month] - array[month - 1];
225 }

References System.array, System.Globalization.GregorianCalendar.DaysToMonth365, System.Globalization.GregorianCalendar.DaysToMonth366, and System.year.