// 判断year年是否为闰年 public static bool IsLeapYear(int year) { bool b1 = (year % 4 == 0) && (year % 100 != 0); bool b2 = (year % 400 == 0); return b1 || b2; }