Task

Determine whether a given year is a leap year in the Gregorian calendar.



See also

 Leap year (wiki)


isLeapYear := proc(year)
	if not year mod 4 = 0 or (year mod 100 = 0 and not year mod 400 = 0) then
		return false;
	else
		return true;
	end if;
end proc: