Leap Year Rules - Why It's Not Just Every 4 Years
Leap years are not simply every fourth year. The Gregorian calendar uses a 400-year cycle with two exception rules to keep the calendar aligned with Earth's orbit. This article explains the astronomy behind the rules, the implementation pitfalls programmers face, and the looming year 4000 problem.