Template:Dr-yr

From BoyWiki
Revision as of 18:21, 2 February 2013 by Etenne (talk | contribs) (New page: <includeonly>{{#switch:{{{2}}}|y={{{1}}}|d={{#switch:w{{{1}}}|w0=1|w-0=-8|{{#expr: {{{1}}}*10{{#ifexpr:{{{1}}}<0|-8|+1}}}}}}|c={{#expr:{{{1}}}*100{{#ifexpr: {{{1}}}>0|-98|+1}}}}|m={{#expr:...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Converts a year/decade/century/millennium number (prefix a minus for BC) into a representative year (the second year, for decades/centuries/millennia) of that period, for use in {{dr}}. Second parameter is y/d/c/m.