9 lines
328 B
Text
9 lines
328 B
Text
/**
|
|
<doc><h2>Leap year, in Neko</h2></doc>
|
|
**/
|
|
|
|
var leapyear = function(y) return ($not(y % 4) && $istrue(y % 100) || $not(y % 400))
|
|
|
|
var tests = $array(2000, 1997, 1996, 1994, 1990, 1980, 1900)
|
|
var cnt = $asize(tests)
|
|
while (cnt -= 1) >= 0 $print(tests[cnt], if leapyear(tests[cnt]) " is" else " is not", " a leapyear", "\n")
|