Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  





2 Parameters  





3 Formula  





4 Sanity check  














Template:IsLeapYear






Afrikaans
Anarâškielâ
العربية
Arpetan

Asturianu
Azərbaycanca

Башҡортса
Català
Dolnoserbski
Español
Esperanto
فارسی
Français
Galego


Հայերեն
Hornjoserbsce
Italiano
Kurdî
Latviešu
Ligure
Македонски

Malti

Bahasa Melayu

Nederlands


Occitan
ି


Polski
Português
Română
Seeltersk
Shqip
Simple English
Slovenčina
Slovenščina
Српски / srpski
Svenska
Tagalog
Taqbaylit
Tarandíne


Тоҷикӣ
Türkçe
Türkmençe
اردو
Tiếng Vit

 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 


1

{{IsLeapYear|year}}
year defaults to {{CURRENTYEAR}} (2024). 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

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

Results for fractions like {{IsLeapYear|2000.9}} → 1 are rounded down (floor).


Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:IsLeapYear&oldid=918240820"

Category: 
Date mathematics templates
Hidden category: 
Wikipedia semi-protected templates
 



This page was last edited on 27 September 2019, at 18:00 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki