Leap year: Difference between revisions
m
simplify
m (even more concise) |
m (simplify) |
||
Line 2,738:
=={{header|OCaml}}==
<syntaxhighlight lang="ocaml">let is_leap_year ~year =
Using Unix Time functions:
<syntaxhighlight lang="ocaml">let is_leap_year ~year =
Line 3,069 ⟶ 3,067:
or
<syntaxhighlight lang="python">def is_leap_year(year):
return not year % (4 if year % 100
Asking for forgiveness instead of permission:
<syntaxhighlight lang="python">import datetime
|