Zum Inhalt springen

Foarloage:IsLeapYear/Dokumentation

Uut Wikipedia

Usage:
Foarloage:Tlx
year defaults to Foarloage:Evaldemo. It must be specified in the Gregorian calendar, extended to all epochs using linear year numbering: use the proleptic Gregorian calendar in Christian Era before the change, and the astronomical year convention (using negative numbers, and year 0) in all years BC before the Christian era (there's a difference of 1 in absolute value).
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:
Foarloage:Evaldemo/3: 2000 AD is effectively a leap year (in both the Julian and Gregorian calendars).
Foarloage:Evaldemo/3: 2000 AD is effectively a leap year (in both the Julian and Gregorian calendars).
Foarloage:Evaldemo/3: 2001 AD is not a leap year.
Foarloage:Evaldemo/3: 2004 AD is a leap year.
Foarloage:Evaldemo/3: 2005 AD is not a leap year.
Foarloage:Evaldemo/3: 2007 AD is not a leap year.
Foarloage:Evaldemo/3: 2008 AD is a leap year.
Foarloage:Evaldemo/3: 2009 AD is not a leap year.
Foarloage:Evaldemo/3: 2100 AD is not a leap year in the Gregorian calendar (but not in the Julian calendar).
Foarloage:Evaldemo/3: 2400 AD is effectively a leap year (in both the Julian and Gregorian calendars).
Foarloage:Evaldemo/3: 1900 AD is not a leap year in the Gregorian calendar (but not in the Julian calendar).
Foarloage:Evaldemo/3: 1800 AD is not a leap year in the Gregorian calendar (but not in the Julian calendar).
Foarloage:Evaldemo/3: 1700 AD is not a leap year in the Gregorian calendar (but not in the Julian calendar).
Foarloage:Evaldemo/3: 1600 AD is effectively a leap year (in both the Julian and Gregorian calendars).
Foarloage:Evaldemo/3: 1500 AD is not a leap year in the proleptic Gregorian calendar (but is leap in the actual Julian calendar).
Foarloage:Evaldemo/3: 1 BC is a leap year in the astronomical calendar (mostly pointless for actual calendars of such epoch, but correct in the astronomical calendar where it is year 0).
Foarloage:Evaldemo/3: 101 BC is not a leap year in the astronomical calendar (mostly pointless for actual calendars of such epoch, but correct in the astronomical calendar where it is year -100).

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