Skip to content

Instantly share code, notes, and snippets.

@udzura
Created July 17, 2012 00:06
Show Gist options
  • Save udzura/3126014 to your computer and use it in GitHub Desktop.
Save udzura/3126014 to your computer and use it in GitHub Desktop.
Question
def leap_year?(year)
if !year.is_a?(Integer)
return false
end
if year % 4 == 0
if year % 100 == 0
if year % 400 == 0
return true
else
return false
end
else
return true
end
else
return false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment