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 Instructions  





2 Usage  





3 Note to editors  





4 Template data  














Template:Year article header






تۆرکجه
Basa Bali
 / Bân-lâm-gú
Беларуская (тарашкевіца)

/Hak-kâ-ngî
ि
Bahasa Indonesia

Bahasa Melayu
 / Mìng-dĕ̤ng-nḡ

ି

Scots

Simple English
سنڌي
کوردی
اردو
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
 


These notes and instructions only appear to people reading the template directly; when it is used, you do not see this.

Instructions

The purpose of this template is to create a standard, uniform calendar description as the first sentence for all years from 1582 on with links to the appropriate terms. It's designed to say the year as either being "was" the year if it is before this year, "is" this year if it's the current year, and "will be" the year if it's after this year, e.g. in 2012, years 2011 and before would say "2011 was a common year starting on..." "2012 is the current year, and is a leap year starting on..." "2013 will be a common year starting on..."

Yes, it does know that only century years which are divisible by 400 are leap years.

Suppose that y is the current year. Then for year y+1, it will say "will be a", then in year y+1, it will say "is the current year, and is a", and finally in year y+2, it will say "was a".

The nice thing about this is that because it's all generated programmatically, when the current year changes it makes the change automatically without requiring human intervention.

Usage

{{Year article header|year it covers}} as the first item in the text of a year, e.g. {{Year article header|2092}} for the article for that year. Note that inserting the year directly as opposed to using {{PAGENAME}} was intentional; I needed to make calculations on the value passed and I wanted to make sure I could do that, plus I couldn't test the template if I used the PAGENAME parameter.

If not supplied an argument, {{Year article header}} defaults its first parameter to {{CURRENTYEAR}}.

Note to editors

It currently does work perfectly for years after 1582. Years before 1582 show Julian and proleptic Gregorian. 1582 shows Julian plus warning and proleptic Gregorian, 1583 and later, Gregorian with Julian and number of days off for years below 1924, Gregorian only after 1923.

Template data

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Year article header in articles based on its TemplateData.

TemplateData for Year article header

This template creates an introduction to an article about a year.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Year1

The year to create an introduction for.

Example
2018
Numberrequired

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

Hidden categories: 
Wikipedia extended-confirmed-protected templates
Templates that generate short descriptions
Templates using TemplateData
 



This page was last edited on 15 October 2021, at 02:50 (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