Template:IsLeapYear

MyWikiBiz, Author Your Legacy — Saturday November 30, 2024
Revision as of 23:49, 30 November 2006 by Centiare (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

1

This template documentation is transcluded from Template:IsLeapYear/doc [edit]

Usage:
Template:Tlx
year defaults to {{ CURRENTYEAR}} = 2024.
Formula:
{{#expr: ((({{{1}}}) mod 4 = 0) and (({{{1}}}) mod 100 != 0)) or (({{{1}}}) mod 400 = 0)}}
Use {{subst:IsLeapYear}} to get this code ready for optional substitution into another template.
Sanity check:
Template:Evaldemo/3
Template:Evaldemo/3, 2007 is not a leap year.
Template:Evaldemo/3, 2008 is a leap year.
Template:Evaldemo/3, 2100 is not a leap year.
Template:Evaldemo/3, 2400 is a leap year.
Template:Evaldemo/3, proleptic Gregorian calendar.
Template:Evaldemo/3 for 101 BC (mostly pointless).
Template:Evaldemo/3, guess why.

Results for fractions like Template:Evaldemo/3 are unspecified, even if it apparently gives an "expected" result at the moment this might change without notice.