CJam, 12 bytes
rS+2m<~e|4%!
This full program read from STDIN and prints 1 for leap years and 0 otherwise.
Verify the test cases yourself in the CJam interpreter.
How it works
How it works
r e# Read from STDIN.
S+ e# Append a space.
2m< e# Rotate two characters to the left.
~ e# Evaluate.
e# So far, we achieved "1954" -> "54 19" -> 54 19.
e| e# Logical OR; keep the leftmost non-zero integer.
4%! e# Logical NOT of the kept integer modulo 4.
e# This pushes 1 for multiples of 4 and 0 otherwise.