# Template:IsLeapYear/doc

- Usage:
- Template:Tlx
*year*defaults to {{`CURRENTYEAR`

}} = 2023.- 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.