Fix leap year calculation.