Skip to content

Instantly share code, notes, and snippets.

@nobusue
Created October 10, 2010 12:20
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 nobusue/619200 to your computer and use it in GitHub Desktop.
Save nobusue/619200 to your computer and use it in GitHub Desktop.
// g100pon #49 閏年
// see http://d.hatena.ne.jp/orangeclover/20091225/1261752620 for detailed
def isLeapYear(int year){
Calendar.getInstance().isLeapYear(year)
}
assert isLeapYear(2000) == true
assert isLeapYear(1900) == false
assert isLeapYear(1996) == true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment