Hint: What does the mod function tell you? Specifially, if mod(Y,4)==0, what would that tell you? Similarly, what would it tell you if mod(y,100)==0 tell you? Finally, what does this mod(y,400)==0 tell you?
Your homework, not mine, although I would argue I just gave you the answer, IF you think about what I wrote.