سانچہ:IsLeapYear
ظاہری ہیئت
0
Usage
[ترمیم]{{is leap year|year}}- year defaults to
{{CURRENTYEAR}}(2026). 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).
Parameters
[ترمیم]- Unnamed parameter The year to calculate with (default: 2026)
|yes=What to output if it is a leap year (default : 1)|no=What to output if it isn't a leap year (default: 0)
Formula
[ترمیم]The template currently uses Wikimedia function time (#time). It is the same as if 4 mod year = 0 and 100 mod year ≠ 0, then not a leap year, unless 400 mod year = 0, then it is a leap year.
Sanity check
[ترمیم]- لوا خطا: expandTemplate: template "Template:is leap year" does not exist۔: 2000 AD is effectively a leap year (in both the Julian and Gregorian calendars).
- لوا خطا: expandTemplate: template "Template:is leap year" does not exist۔: 2000 AD is effectively a leap year (in both the Julian and Gregorian calendars).
- لوا خطا: expandTemplate: template "Template:is leap year" does not exist۔: 2001 AD is not a leap year.
- لوا خطا: expandTemplate: template "Template:is leap year" does not exist۔: 2004 AD is a leap year.
- لوا خطا: expandTemplate: template "Template:is leap year" does not exist۔: 2005 AD is not a leap year.
- لوا خطا: expandTemplate: template "Template:is leap year" does not exist۔: 2007 AD is not a leap year.
- لوا خطا: expandTemplate: template "Template:is leap year" does not exist۔: 2008 AD is a leap year.
- لوا خطا: expandTemplate: template "Template:is leap year" does not exist۔: 2009 AD is not a leap year.
- لوا خطا: expandTemplate: template "Template:is leap year" does not exist۔: 2100 AD is not a leap year in the Gregorian calendar (but not in the Julian calendar).
- لوا خطا: expandTemplate: template "Template:is leap year" does not exist۔: 2400 AD is effectively a leap year (in both the Julian and Gregorian calendars).
- لوا خطا: expandTemplate: template "Template:is leap year" does not exist۔: 1900 AD is not a leap year in the Gregorian calendar (but not in the Julian calendar).
- لوا خطا: expandTemplate: template "Template:is leap year" does not exist۔: 1800 AD is not a leap year in the Gregorian calendar (but not in the Julian calendar).
- لوا خطا: expandTemplate: template "Template:is leap year" does not exist۔: 1700 AD is not a leap year in the Gregorian calendar (but not in the Julian calendar).
- لوا خطا: expandTemplate: template "Template:is leap year" does not exist۔: 1600 AD is effectively a leap year (in both the Julian and Gregorian calendars).
- لوا خطا: expandTemplate: template "Template:is leap year" does not exist۔: 1500 AD is not a leap year in the proleptic Gregorian calendar (but is leap in the actual Julian calendar).
{{is leap year|0}}: 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).- لوا خطا: expandTemplate: template "Template:is leap year" does not exist۔: 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 لوا خطا: expandTemplate: template "Template:is leap year" does not exist۔ are rounded down (floor).
| اوپر دی گئی دستاویز صفحہ سانچہ:IsLeapYear/دستاویز سے شامل کی گئی ہے۔ (ترمیم | تاریخچہ) صارفین سانچہ کے تختہ مشق (تخلیق | آئینہ) اور ثابتات (تخلیق) میں تجربات کرسکتے ہیں۔ براہ کرم /دستاویز کے ذیلی صفحہ پر زمرہ جات شامل فرمائیں۔ اس سانچہ کے ذیلی صفحات۔ |