Jump to content

Template:Centurynum/adbc: Difference between revisions

From IdeaWazaWiki
wikademia>Jimp
creating template to convert "nth century" to "AD" & "nth century BC" to "BC"
 
wikademia>Jimp
added explanation and adjusted the default to match the subtemplate name
Line 1: Line 1:
{{#ifeq:{{Centurynum/n|{{{1}}}}}|{{Centurynum/switch|{{{1}}}}}|BC}}{{#ifeq:{{Centurynum/n|{{{1}}}}}|{{Centurynum/switch|{{{1}}} BC}}|AD}}
<noinclude>*Input a parameter of the form ''nth century''
::and get ''AD''.
*Input a parameter of the form ''nth century BC''
::and get ''BC''.
*Else get
::get ''</noinclude>{{#ifeq:{{Centurynum/n|{{{1}}}}}|{{Centurynum/switch|{{{1}}} BC}}|AD}}{{#ifeq:{{Centurynum/n|{{{1}}}}}|{{Centurynum/switch|{{{1}}}}}|BC}}<noinclude>''.
 
;Note:
:It works for all interger n, 100 ≥ n ≥ 1.</noinclude>

Revision as of 00:39, 6 July 2007

  • Input a parameter of the form nth century
and get AD.
  • Input a parameter of the form nth century BC
and get BC.
  • Else get
get ADBC.
Note
It works for all interger n, 100 ≥ n ≥ 1.