Template:Year nav: Difference between revisions
From BoyWiki
No edit summary Tag: Reverted |
No edit summary Tag: Manual revert |
||
Line 1: | Line 1: | ||
{| class="infobox" style="text-align: center;" | {| class="infobox" style="text-align: center;" | ||
| align="right" | <small>'''[[List of centuries|Centuries]]:''' </small> | |||
| {{ | | 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]]''' -<!-- | |||
--> [[{{ordinal|{{#expr: (({{{1|888}}} - 1) - (({{{1|888}}} - 1) mod 100))/100 + 2}}}} century]] | |||
|- | |- | ||
| align="right" | <small>'''[[List of decades|Decades]]:'''</small> | |||
| {{ | | align="center" | <small> <!-- | ||
--> [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) - 30}}s]] <!-- | |||
--> [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) - 20}}s]] <!-- | |||
--> [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) - 10}}s]] <!-- | |||
{{ | --> - [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10))}}s]] -<!-- | ||
--> [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) + 10}}s]]<!-- | |||
--> [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) + 20}}s]]<!-- | |||
--> [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) + 30}}s]] | |||
</small> | |||
|- | |- | ||
| 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> | |}<noinclude> | ||
[[Category:History and events navbox templates]] | [[Category:History and events navbox templates]] | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 13:43, 1 January 2023
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:
Example for "{{Year nav|101}}" at right:
Example for "{{Year nav|100}}" [invalid] at right:
- 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.
Visit Template:Year nav/doc to edit this template's description!
Done making changes? Refresh Also see: Portal:Template index and Help:Templates
Done making changes? Refresh Also see: Portal:Template index and Help:Templates