Template:CenturyNav: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
no edit summary
(previous and next put into template proper)
No edit summary
Line 10: Line 10:
</includeonly><noinclude>[[Category:Template sandbox]]
</includeonly><noinclude>[[Category:Template sandbox]]
   
   
ultimately will use <nowiki>
next up is how to get the thing to work for centuries with 1 digit and 3 digits.  Probably will use some kind of #switch. Something like #switch:{{#pos:{{PAGENAME}}|c.  Then if the position of c is 5 it's a 1 digit century.  if it's 7 it's a 3 digit century. and therefore the sub will have to take either the first, or the first 3 digits.  </nowiki></noinclude>
{{#sub:{{PAGENAME}}|0|2}} as the core engine
prolly have to throw in some #if or #switch thingies to capture centuries that are 1 or 3 numbers in length.
 
{{{1|{{#expr:{{#sub:{{PAGENAME}}|0|2}} -1}} }}} -1 or +1 gives prev and next cent and should assign to the variable {{{1}}}
 
 
 
 
for decades
{{#sub:{{PAGENAME}}|0|4}}</nowiki></noinclude>
85,404

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.