Skip to content

Instantly share code, notes, and snippets.

@samidarko
Last active March 18, 2018 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samidarko/0f75c838b8fb45f28e698488c89c3cb2 to your computer and use it in GitHub Desktop.
Save samidarko/0f75c838b8fb45f28e698488c89c3cb2 to your computer and use it in GitHub Desktop.
calculate leap yers
isLeapYear y
| y `mod` 4 == 0 = if y `mod` 100 == 0 then (y `mod` 400 == 0) else True
| otherwise = False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment