Vorlage:Year nav: Unterschied zwischen den Versionen

Aus BoyWiki
Die Seite wurde neu angelegt: <includeonly>{{#if:{{{nodiv|}}}|<!--then: --> <span class="noprint plainlinksneverexpand" style="white-space:nowrap; font-weight:normal; font-size:xx-small; {{{fon...
 
Keine Bearbeitungszusammenfassung
 
Zeile 1: Zeile 1:
<includeonly>{{#if:{{{nodiv|}}}|<!--then:
{| class="infobox" style="text-align: center;"
-->&nbsp;<span class="noprint plainlinksneverexpand" style="white-space:nowrap; font-weight:normal; font-size:xx-small; {{{fontstyle|}}}; {{#if:{{{fontcolor|}}}|color:{{{fontcolor}}};}} {{{style|}}}">|<!--else:
| align="right" | <small>'''[[List of centuries|Centuries]]:''' </small>
--><div class="noprint plainlinksneverexpand" style="background-color:transparent; padding:0; white-space:nowrap; font-weight:normal; font-size:xx-small; {{{fontstyle|}}}; {{#if:{{{fontcolor|}}}|color:{{{fontcolor}}};}} {{{style|}}}"><!--
| align="center" | <!--
-->}}<!--
--> [[{{ordinal|{{#expr: (({{{1|888}}} - 1) - (({{{1|888}}} - 1) mod 100))/100}}}} century]]<!--
 
--> - '''[[{{ordinal|{{#expr: (({{{1|888}}} - 1) - (({{{1|888}}} - 1) mod 100))/100 + 1}}}} century]]''' -<!--
-->{{#ifeq:{{{mini|}}}{{{miniv|}}}{{{plain|}}}{{{viewplain|}}}|<!--equals:-->1|<!--then:
--> [[{{ordinal|{{#expr: (({{{1|888}}} - 1) - (({{{1|888}}} - 1) mod 100))/100 + 2}}}} century]]
-->|<!--else:
|-
-->This box:&nbsp;<!--
| align="right" | <small>'''[[List of decades|Decades]]:'''</small>
-->}}<!--
| align="center" | <small> <!--
 
--> [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) - 30}}s]]&nbsp;<!--
-->{{#ifeq:{{{miniv|}}}{{{viewplain|}}}|<!--equals:-->1|<!--then:
--> [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) - 20}}s]]&nbsp;<!--
-->[[Template:{{{1}}}|<span title="View this template" style="{{{fontstyle|}}};{{#if:{{{fontcolor|}}}|color:{{{fontcolor}}};}}">{{#if:{{{viewplain|}}}|view|v}}</span>]]|<!--else:
--> [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) - 10}}s]]&nbsp;<!--
-->[[Template:{{{1}}}|<span title="View this template" style="{{{fontstyle|}}};{{#if:{{{fontcolor|}}}|color:{{{fontcolor}}};}}">{{#if:{{{mini|}}}|v|view}}</span>]]&nbsp;<span style="font-size:80%;">•</span>&nbsp;[[Template talk:{{{1}}}|<span style="color:#002bb8;{{{fontstyle|}}};{{#if:{{{fontcolor|}}}|color:{{{fontcolor}}};}}" title="Discussion about this template">{{#if:{{{mini|}}}|d|talk}}</span>]]&nbsp;<span style="font-size:80%;">•</span>&nbsp;[{{fullurl:{{ns:10}}:{{{1}}}|action=edit}} <span style="color:#002bb8;{{{fontstyle|}}};{{#if:{{{fontcolor|}}}|color:{{{fontcolor}}};}}" title="You can edit this template. Please use the preview button before saving.">{{#if:{{{mini|}}}|e|edit}}</span>]<!--
--> - [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10))}}s]] -<!--
-->}}<!--
--> &nbsp;[[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) + 10}}s]]<!--
 
--> &nbsp;[[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) + 20}}s]]<!--
-->{{#if:{{{nodiv|}}}|<!--then:
--> &nbsp;[[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) + 30}}s]]
--></span>&nbsp;|<!--else:
</small>
--></div><!--
|-
-->}}</includeonly><noinclude>
| align="right" | <small>'''[[List of years|Years]]:'''</small>
| align="center" | <!--
--> [[{{#expr: {{{1|888}}} - 3}}]]<!--
--> [[{{#expr: {{{1|888}}} - 2}}]]<!--
--> [[{{#expr: {{{1|888}}} - 1}}]]<!--
--> - '''[[{{{1|888}}}]]''' -<!--
--> [[{{#expr: {{{1|888}}} + 1}}]]<!--
--> [[{{#expr: {{{1|888}}} + 2}}]]<!--
--> [[{{#expr: {{{1|888}}} + 3}}]]
|}<noinclude>
{{pp-template|small=yes}}
{{pp-template|small=yes}}
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Aktuelle Version vom 6. Dezember 2008, 22:17 Uhr

Centuries: 8th century - 9th century - 10th century
Decades: 850s  860s  870s  - 880s -  890s  900s  910s

Years: 885 886 887 - 888 - 889 890 891
[edit] Datei:Template-info.svg Template documentation

Result

Output for default year "888" can be seen above.

Usage

Takes one parameter, the year-number (year 101 or higher).
The box width shrinks nearly 6% for smaller year-number sizes.

Example for "{{Year nav|1970}}" at right:
Centuries: 19th century - 20th century - 21st century
Decades: 1940s  1950s  1960s  - 1970s -  1980s  1990s  2000s

Years: 1967 1968 1969 - 1970 - 1971 1972 1973


Example for "{{Year nav|101}}" at right:
Centuries: 1st century - 2nd century - 3rd century
Decades: 70s  80s  90s  - 100s -  110s  120s  130s

Years: 98 99 100 - 101 - 102 103 104


Example for "{{Year nav|100}}" [invalid] at right:
Centuries: 0th century - 1st century - 2nd century
Decades: 70s  80s  90s  - 100s -  110s  120s  130s

Years: 97 98 99 - 100 - 101 102 103
Use other tables to handle year 100 or below.

Notes

  • This template uses the #expr parser function to calculate centuries, decades, and year numbers surrounding the year parameter.
  • Negative numbers are passed through, not as "BC" but negative.
  • Variables are not used, as they were not a supported feature when this template was created, so calculations are made twice, as needed, to determine results.

zh-yue:Template:年代 da:Skabelon:år es:Plantilla:Año ia:Patrono:Anno nav tet:Template:Tinan th:แม่แบบ:กล่องรวมปี zh:Template:YearTOC