Jump to content

Template:Year article header: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
 
(57 intermediate revisions by 25 users not shown)
Line 1: Line 1:
<includeonly>'''{{{1|{{CURRENTYEAR}}}}}''' {{#ifeq:{{#expr:{{{1|{{CURRENTYEAR}}}}}>=0}}|1|([[Roman numerals|{{Roman|{{{1|{{CURRENTYEAR}}}}}|Roman numeral out of range}}]])|}} {{#ifeq: {{#expr:{{{1|{{CURRENTYEAR}}}}}>1582}}|0
<noinclude> {{esoteric}}

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

Note: This template is good enough to use on years after 1929. If you are planning to work on it to fix the issue of Julian display for years 1600 through 1929, it would be nice if you contact me, I might be able to help. [[User:Rfc1394|Paul Robinson (Rfc1394)]] ([[User talk:Rfc1394|talk]]) 20:25, 29 July 2013 (UTC)

==Instructions==
The purpose of this template is to create a standard, uniform calendar description as the first sentence for all years, at least from 1600 on, with links to the appropriate terms. Currently, it works fine for 1930 and later; the Julian calculations need a bit of work. 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 a leap year starting on..., and is the current year" "2013 will be a common year starting on..."

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

Also, leave the space between "millenium" and the comma, it's a mnemonic to remind me it's a template and I need to fix (1) the before 1930 issue, and (2)add the letter representing leap year/exeptional/common year on day of week year starts in calcluations. (See the source code for 1997 for details where it's missing.)

==Usage==
'''<nowiki>{{</nowiki>Year article header|year it covers}}''' as the first item in the text of a year, e.g.
'''<nowiki>{{</nowiki>Year article header|2092}}''' for the article for that year.
==Note to editors==
With very limited exceptions, because of bugs in PHP, this will probably not work before 1600. It currently does work perfectly for years after 1929 (1930 and later stopped using Julian Calendars; the Julian calculations need a bit more work). Years before 1582 show Julian and prospective Gregorian. 1582 shows Julian plus warning and prospective Gregorian, 1583 and later, Gregorian with Julian and number of days off for years below 1930, Gregorian only after 1929.
</noinclude><includeonly>
'''{{{1}}} ([[Roman numerals|{{#time:xrY|{{{1}}}-01-01}}]])'''
{{#ifeq: {{#expr:{{{1}}}>1582}}|0
|<!-- Years On or Before 1582 -->
|<!-- Years On or Before 1582 -->
{{#ifeq: {{#expr:{{{1}}}=1582}}|0
{{#ifeq: {{#expr:{{{1|{{CURRENTYEAR}}}}}=1582}}|0
|<!-- Years Before 1582 -->Before 1582, with Julian {{Year article header Julian day|{{{1}}}}} days difference.
|<!-- Years Before 1582 -->was {{Year article header/zc|{{{1|{{CURRENTYEAR}}}}}}}. As of the start of {{Year article header/Julian day|{{{1|{{CURRENTYEAR}}}}}}}, which was the dominant calendar of the time.
|<!-- In 1582 -->
|<!-- In 1582 -->
<!--Text for the year 1582 -->On 1582, with Julian {{Year article header Julian day|{{{1}}}}} days difference. However, this year also saw the beginning of the '''''Gregorian Calendar switch''''', when the [[Papal bull]] known as ''[[Inter gravissimas]]'' introduced the [[Gregorian calendar]], adopted by Spain, Portugal, the [[Polish–Lithuanian Commonwealth]] and most of present-day Italy from the start. In these countries, the year continued as normal until Thursday, [[October 4]]. However, the next day became Friday, [[October 15]] (like a [[common year starting on Friday]]), in those countries (France followed two months later, letting Sunday, [[December 9]] be followed by Monday, [[December 20]]). Other countries continued using the Julian calendar, switching calendars in later years, and the complete conversion of the Gregorian calendar was not entirely done until [[1929]].}}|<!-- Years On or After 1582 -->
<!--Text for the year 1582 -->was {{Year article header/zc|1582}}. As of the start of {{Year article header/Julian day|{{{1|{{CURRENTYEAR}}}}}}}, which had previously been the universally accepted calendar in Christian nations. However, this year saw the beginning of the '''''Gregorian Calendar switch''''', when the [[Papal bull]] known as {{lang|la|[[Inter gravissimas]]}} introduced the [[Gregorian calendar]], adopted by Spain, Portugal, the [[Polish–Lithuanian Commonwealth]] and most of present-day Italy from the start. In these countries, the year continued as normal until Thursday, [[October 4]]. However, the next day became Friday, [[October 15]] (like a [[common year starting on Friday]]), in those countries (France followed two months later, letting Sunday, [[December 9]] be followed by Monday, [[December 20]]). Other countries continued using the Julian calendar for decades or, in some cases, centuries.}}|<!-- Years On or After 1582 -->
{{#ifeq: {{#expr:{{{1}}}>1929}}|0
{{#ifeq: {{#expr:{{{1|{{CURRENTYEAR}}}}}>1923}}|0
|<!-- Years 1583 through 1929 -->
|<!-- Years 1583 through 1923 -->
{{#ifeq: {{#expr:{{{1}}}=1929}}|0
{{#ifeq: {{#expr:{{{1|{{CURRENTYEAR}}}}}=1923}}|0
|<!-- Before 1929 -->was {{Year_article_header_zc|{{{1}}}}} between 1583 and 1929 and with Julian {{Year article header Julian day|{{{1}}}}} calendar days difference, which continued to be used until the complete conversion of the Gregorian calendar was entirely done in [[1929]].
|<!-- Before 1923 -->was {{Year article header/zc|{{{1|{{CURRENTYEAR}}}}}}}. As of the start of {{Year article header/Julian day|{{{1|{{CURRENTYEAR}}}}}}}, which remained in localized use until 1923.
|<!-- 1929 was a [[Common year starting on Tuesday]] -->was {{Year_article_header_zc|1929}}, with Julian {{Year article header Julian day|{{{1}}}}} days difference, and was the last year in which the Julian calendar continued to be used when complete conversion of the Gregorian calendar was entirely done.
|<!-- 1923 was a [[Common year starting on Monday]] -->was {{Year article header/zc|1923}}. As of the start of {{Year article header/Julian day|{{{1|{{CURRENTYEAR}}}}}}}, which was relegated that February to use only by churches after [[Greece]] adopted the Gregorian calendar.}}
|<!-- 1924 and later-->
}}
<!-- Test for past vs present vs future -->{{#ifeq: {{#expr:{{#time:Y}} < {{{1|{{CURRENTYEAR}}}}}}} | 0 | {{#ifeq: {{#expr:{{#time:Y}} > {{{1|{{CURRENTYEAR}}}}}}} | 0 | is the current year, and is | was }} | will be }} {{Year article header/zc|{{{1|{{CURRENTYEAR}}}}}}}.
|<!-- 1930 and later-->
}}}} {{main other|{{Short description|Calendar year|noreplace}}}} </includeonly><noinclude>{{Short description|A template to set up a consistent opening paragraph for most years }}
<!-- Test for past vs present vs future -->{{#ifeq: {{#expr:{{#time:Y}} < {{{1}}}}} | 0 | {{#ifeq: {{#expr:{{#time:Y}} > {{{1}}}}} | 0 | is..., and is the current year| was }} | will be }} {{Year_article_header_zc|{{{1}}}}}.
{{Documentation}}
}}}}</includeonly>
</noinclude>

Latest revision as of 22:15, 6 November 2024