{{{{{subst|}}}#expr: ((({{{1|{{CURRENTYEAR}}}}}) mod 4 = 0) and (({{{1|{{CURRENTYEAR}}}}}) mod 100 != 0)) or (({{{1|{{CURRENTYEAR}}}}}) mod 400 = 0)}}<noinclude>
----
; Usage:
: {{Tlx|{{PAGENAME}}|''year''}}
: ''year'' defaults to {{evaldemo|CURRENTYEAR|=}}.
; Formula:
: <nowiki>{{#expr: ((({{{1}}}) mod 4 = 0) and (({{{1}}}) mod 100 != 0)) or (({{{1}}}) mod 400 = 0)}}</nowiki>
: Use {{subst:{{PAGENAME}}}} to get this code ready for [[Help:Substitution#Optional_substitution|optional substitution]] into another template.
; Sanity check:
: {{evaldemo/3|{{PAGENAME}}|2007}}, 2007 is no leap year.
: {{evaldemo/3|{{PAGENAME}}|2008}}, 2008 is a leap year.
: {{evaldemo/3|{{PAGENAME}}|2100}}, 2100 is no leap year.
: {{evaldemo/3|{{PAGENAME}}|2400}}, 2400 is a leap year.
: {{evaldemo/3|{{PAGENAME}}|1500}}, [[w:en:Proleptic Gregorian calendar|proleptic Gregorian calendar]].
: {{evaldemo/3|{{PAGENAME}}|-100}} for 101 BC (mostly pointless).
: {{evaldemo/3|{{PAGENAME}}|502*4-8}}, guess why.
Results for fractions like {{evaldemo/3|{{PAGENAME}}|2000.9|5==}} are unspecified, even if it apparently gives an "expected" result at the moment this might change without notice.