Last active
August 8, 2016 19:13
-
-
Save sentientmonkey/974b77a38f1714c1846922ae53703999 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn is_leap_year(year: u64) -> bool { | |
match (year % 4, year % 100, year % 400) { | |
(0, 0, 0) => true, | |
(0, 0, _) => false, | |
(0, _, _) => true, | |
(_, _, _) => false, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment