int days = 30 + (month + month / 8) % 2; (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)