Template:Dr-logno

From BoyWiki
Revision as of 18:02, 2 February 2013 by Etenne (talk | contribs) (New page: <includeonly>{{#switch:{{{3}}}|y={{#expr:{{#ifexpr:{{{1}}}<0|{{{1}}}+1|{{{1}}}}}+{{{2|0}}}}}|d={{#expr:{{#ifexpr:{{{1}}}<0|-1+({{{1}}} - {{{1}}} mod 10)/10|({{{1}}} - {{{1}}} mod 10)/10}}+...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Converts a year (first parameter, e.g. 1998 for 1998 AD, -1998 for 1998 BC) into a logically-numbered year/decade/century/millennium. For use in {{dr}}). Applies an offset (second parameter; defaults to 0). Third parameter is y/d/c/m.