You need to check the year (not the current) for leap year. Found such an algorithm:
- The year is divisible by 400 -> leap -> end
- The year is divided by 100 -> not a leap year -> end
- The year is divided into 4 -> leap -> end
- Year not leap year -> end
- Everything
Is he correct? (How can a number be divisible by 400 and not divisible by 100?)