The three-part rule
A Gregorian year is a leap year if it is divisible by 4, except years divisible by 100 are not leap years unless they are also divisible by 400.
That makes 2000 a leap year because it is divisible by 400. The years 1900 and 2100 are not leap years because they are divisible by 100 but not by 400.
How the extra day changes calculations
A range from January 1 to March 1 contains 60 days in 2024 and 59 days in 2025 when the end date is excluded. Dates after February also move one weekday farther in a leap year.
Adding a year to February 29 needs an explicit rule because the target year may not contain that date. Plain Dates clamps it to February 28 in a non-leap year.
Where the rule is used
The day-of-week, date addition, age, date difference, and printable calendar tools all use the same Gregorian rule. Consistency matters more than hiding the edge case.