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

◆ IsLeapDay()

bool System.Globalization.GregorianCalendarHelper.IsLeapDay ( int year,
int month,
int day,
int era )
inline

Definition at line 321 of file GregorianCalendarHelper.cs.

322 {
323 if (day < 1 || day > GetDaysInMonth(year, month, era))
324 {
325 throw new ArgumentOutOfRangeException("day", SR.Format(SR.ArgumentOutOfRange_Range, 1, GetDaysInMonth(year, month, era)));
326 }
327 if (!IsLeapYear(year, era))
328 {
329 return false;
330 }
331 if (month == 2 && day == 29)
332 {
333 return true;
334 }
335 return false;
336 }

References System.SR.ArgumentOutOfRange_Range, System.SR.Format(), System.Globalization.GregorianCalendarHelper.GetDaysInMonth(), System.Globalization.GregorianCalendarHelper.IsLeapYear(), and System.year.

Referenced by System.Globalization.JapaneseCalendar.IsLeapDay(), System.Globalization.KoreanCalendar.IsLeapDay(), System.Globalization.TaiwanCalendar.IsLeapDay(), and System.Globalization.ThaiBuddhistCalendar.IsLeapDay().