Template:IsLeapYear/doc

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

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.