Find exactly how many days are in any month of any year, including leap year rules.
The number of days in a month follows a fixed pattern in the Gregorian calendar. January, March, May, July, August, October, and December always have 31 days. April, June, September, and November have 30 days. February is the exception — 28 days normally, 29 in a leap year. A leap year occurs when the year is divisible by 4, except for century years which must also be divisible by 400 (so 2000 was a leap year, but 1900 was not). This rule keeps the calendar aligned with the Earth's orbit around the Sun.
February has 29 days in a leap year and 28 days in a common year. Leap years occur every 4 years, with century years only being leap years if they are also divisible by 400 (so 2000 was a leap year, but 1900 was not).
The months with 31 days are January, March, May, July, August, October, and December. The months with 30 days are April, June, September, and November. February is the exception, with 28 or 29 days.
A year is a leap year if it is divisible by 4. However, if the year is divisible by 100, it is not a leap year unless it is also divisible by 400. This rule keeps the Gregorian calendar aligned with the solar year.