Mathematica knows which numbers are integers. Place the cursor in the cell below and press Shift+Enter.

IntegerQ[7]

IntegerQ[Pi]

We can use this function and the functions And, Not and Or to "teach" Mathematica which years are leap.

LeapQ[yyyy_] := 
      Or[
 
        And[IntegerQ[(yyyy/4)], 
          Not[IntegerQ[(yyyy/100)]]], 
  IntegerQ[
          (yyyy/400)]
]

LeapQ[2100]

LeapQ[2000]

LeapQ[2012]