Changes

1,296 bytes added ,  23:50, 30 November 2006
no edit summary
<includeonly>:''This template documentation is transcluded from [[{{FULLPAGENAME}}/doc]]'' [<span class="plainlinks">[{{fullurl:{{FULLPAGENAMEE}}/doc|action=edit}} edit]</span>]</includeonly>
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
----
; Usage&#58;
: {{Tlx|IsLeapYear|''year''}}
: ''year'' defaults to {{evaldemo|CURRENTYEAR|&#61;}}.
; Formula&#58;
: <nowiki>{{#expr: ((({{{1}}}) mod 4 = 0) and (({{{1}}}) mod 100 != 0)) or (({{{1}}}) mod 400 = 0)}}</nowiki>
: Use {&#123;subst:IsLeapYear&#125;} to get this code ready for [[Help:Substitution#Optional_substitution|optional substitution]] into another template.
; Sanity check&#58;
: {{evaldemo/3|IsLeapYear|2000}}
: {{evaldemo/3|IsLeapYear|2007}}, 2007 is not a leap year.
: {{evaldemo/3|IsLeapYear|2008}}, 2008 is a leap year.
: {{evaldemo/3|IsLeapYear|2100}}, 2100 is not a leap year.
: {{evaldemo/3|IsLeapYear|2400}}, 2400 is a leap year.
: {{evaldemo/3|IsLeapYear|1500}}, [[Proleptic Gregorian calendar|proleptic Gregorian calendar]].
: {{evaldemo/3|IsLeapYear|-100}} for 101 BC (mostly pointless).
: {{evaldemo/3|IsLeapYear|502*4-8}}, guess why.

Results for fractions like {{evaldemo/3|IsLeapYear|2000.9|5==}} are unspecified, even if it apparently gives an "expected" result at the moment this might change without notice.
3,699

edits