If variable goes up by 4 something happens

I am trying to make a calendar app in app lab for my AP Comp Sci class. But I want to know, is there any way to add leap years to this. I tried making it if it is the year 2024,2028,2032,2036, but then I made it so it goes all the way back to 1800 and all the way up to 3000. But when I did that way, it’s just a big orange blob on the screen. So is there any way to make it so if the variable goes up by 4 this will happen.

Is this assignment part of your Create task?