The year 0 and the year 400 are *both* leap years, so your code added an extra Leap-Tuesday into the mix.