Jump to content

Template:Centurybox/nthcent: Difference between revisions

From IdeaWazaWiki
wikademia>Jimp
alternative to "century" also
wikademia>Jimp
unnaming two parameters & making one of these optional
Line 1: Line 1:
<includeonly>{{Ordinal|{{#expr:{{{n}}}+not{{{n}}}}}}} {{#ifexpr:{{{ad}}}=not{{{n}}}|{{{cm|century}}}|{{{cm|century}}} {{{bc|BC}}}}}</includeonly><noinclude>This template
<includeonly>{{Ordinal|{{#expr:{{{1}}}+not{{{1}}}}}}} {{#ifexpr:{{#ifeq:{{{2|AD}}}|BC|0|1}}=not{{{1}}}|{{{cm|century}}}|{{{cm|century}}} {{{bc|BC}}}}}</includeonly><noinclude>This template
*converts {{{n}}} to ''nth century (BC)'' (inclusion of ''BC'' depends on {{{ad}}}),  
*converts {{{1}}} to ''{{{1}}}th century (BC)'' (''BC'' is included iff {{{2}}}=''BC''),  
*handles {{{n}}}=0 correctly &  
*handles {{{1}}}=0 correctly &  
*allows for alternatives to ''century'' & ''BC'' (respective defaults of {{{cm}}} & {{{bc}}}).</noinclude>
*allows for alternatives to ''century'' & ''BC'' (respective defaults of {{{cm}}} & {{{bc}}}).</noinclude>

Revision as of 02:05, 9 July 2007

This template

  • converts {{{1}}} to {{{1}}}th century (BC) (BC is included iff {{{2}}}=BC),
  • handles {{{1}}}=0 correctly &
  • allows for alternatives to century & BC (respective defaults of {{{cm}}} & {{{bc}}}).