Difference between revisions of "Template:Births and deaths by year for decade"

From blackwiki
Jump to navigation Jump to search
imported>Certes
(Show the correct donor article for AD 911 etc. per Template talk:Transclude births)
imported>Certes
(Handle BC decades, including -0 for 0s BC)
Line 1: Line 1:
{{for nowiki|
+
{{#ifeq:{{#invoke:String|sub|{{{1|0}}}}|1|1}}|-|{{for nowiki|
 +
|<nowiki>== {{ucfirst:{{{1}}}}} ==
 +
{{preprocess|{{((}}transcluding articles
 +
  {{!}} {{for loop|{{!}}|call=Year article|pc1n=1|pc1v={{{decade}}}0|pv=2|-9|-8|-7|-6|-5|-4|-3|-2|-1}}
 +
  {{!}} {{#ifeq:{{{decade}}}|-0|{{void|There is no BC year 0}}|{{Year article|{{{decade}}}0}}}}
 +
{{))}}}}
 +
{{for loop|
 +
|call=Transclude {{{1}}}|{{{decade}}}9|{{{decade}}}8|{{{decade}}}7|{{{decade}}}6|{{{decade}}}5|{{{decade}}}4|{{{decade}}}3|{{{decade}}}2|{{{decade}}}1}}
 +
{{#ifeq:{{{decade}}}|-0|{{void|There is no BC year 0}}|
 +
{{Transclude {{{1}}}|{{{decade}}}0}}
 +
}}
 +
</nowiki>|births|deaths|decade={{{1|0}}}}}|{{for nowiki|
 
|<nowiki>== {{ucfirst:{{{1}}}}} ==
 
|<nowiki>== {{ucfirst:{{{1}}}}} ==
 
{{preprocess|{{((}}transcluding articles
 
{{preprocess|{{((}}transcluding articles
Line 10: Line 21:
 
{{for loop|
 
{{for loop|
 
|call=Transclude {{{1}}}|{{{decade}}}1|{{{decade}}}2|{{{decade}}}3|{{{decade}}}4|{{{decade}}}5|{{{decade}}}6|{{{decade}}}7|{{{decade}}}8|{{{decade}}}9}}
 
|call=Transclude {{{1}}}|{{{decade}}}1|{{{decade}}}2|{{{decade}}}3|{{{decade}}}4|{{{decade}}}5|{{{decade}}}6|{{{decade}}}7|{{{decade}}}8|{{{decade}}}9}}
</nowiki>|births|deaths|decade={{{1|0}}}}}
+
</nowiki>|births|deaths|decade={{{1|0}}}}}}}
 
<noinclude>
 
<noinclude>
 
{{documentation |content=
 
{{documentation |content=
Line 21: Line 32:
 
== Example: the 910s AD ==
 
== Example: the 910s AD ==
 
{{{{PAGENAME}}|91}}
 
{{{{PAGENAME}}|91}}
 +
== Example: the 10s BC ==
 +
{{{{PAGENAME}}|-1}}
 +
== Example: the 0s BC ==
 +
{{{{PAGENAME}}|-0}}
 
{{template reference list}}
 
{{template reference list}}
 
{{notelist}}
 
{{notelist}}
 
}}</noinclude>
 
}}</noinclude>

Revision as of 14:44, 29 September 2019

Births

Template:Preprocess

Lua error: expandTemplate: template "Transclude births" does not exist.

Deaths

Template:Preprocess

Lua error: expandTemplate: template "Transclude deaths" does not exist.

Template documentation

Usage

Invoked with a decade as single argument, for example {{Transclude deaths|82}} for the 820s, the template compiles the list of births and deaths from each year article of the decade, by transcluding their "Births" and "Deaths" sections. Empty or non-existent sections are not transcluded. Year numbers are prepended to the transcluded contents with bold pseudo-headers, in order to avoid overloading the transcluding page's table of contents.

Negative years use the BC suffix, years 1–100 use the AD prefix, and years above 100 use the plain year number.

Example: the 70s AD

Births

Template:Preprocess Template:Transclude births Lua error: expandTemplate: template "Transclude births" does not exist.

Deaths

Template:Preprocess Template:Transclude deaths Lua error: expandTemplate: template "Transclude deaths" does not exist.

Example: the 910s AD

Births

Template:Preprocess Template:Transclude births Lua error: expandTemplate: template "Transclude births" does not exist.

Deaths

Template:Preprocess Template:Transclude deaths Lua error: expandTemplate: template "Transclude deaths" does not exist.

Example: the 10s BC

Births

Template:Preprocess Lua error: expandTemplate: template "Transclude births" does not exist. Template:Transclude births

Deaths

Template:Preprocess Lua error: expandTemplate: template "Transclude deaths" does not exist. Template:Transclude deaths

Example: the 0s BC

Births

Template:Preprocess Lua error: expandTemplate: template "Transclude births" does not exist.


Deaths

Template:Preprocess Lua error: expandTemplate: template "Transclude deaths" does not exist.

References