Difference between revisions of "Template talk:History"

From OCE Space Simulation
Jump to: navigation, search
Line 3: Line 3:
 
==Magic Words==
 
==Magic Words==
 
I'm using the magic word <nowiki>{{PAGENAME}}</nowiki> here, which returns the name of the current page. [[User:Stefanido|Stefanido]] 12:26, 2 March 2010 (EST)
 
I'm using the magic word <nowiki>{{PAGENAME}}</nowiki> here, which returns the name of the current page. [[User:Stefanido|Stefanido]] 12:26, 2 March 2010 (EST)
 +
 +
==Trying to make this better==
 +
<nowiki>
 +
curryear={{#expr {{#sub:{{PAGENAME}}|1|4}}}}
 +
twodig={{#expr{{#sub:{{PAGENAME}}|6|2}}}}
 +
 +
preyear={{#expr curryear-1}}
 +
pretwodig={{#expr twodig-1}}
 +
Prev=preyear-pretwodig
 +
 +
postyear={{#expr curryear+1}}
 +
posttwodig={{#expr twodig+1}}
 +
Post=postyear-posttwodig
 +
</nowiki>

Revision as of 14:00, 2 March 2010

No hurt feelings; I should've done it that way from the start. Thanks. Stefanido 17:26, 1 March 2010 (EST)

Magic Words

I'm using the magic word {{PAGENAME}} here, which returns the name of the current page. Stefanido 12:26, 2 March 2010 (EST)

Trying to make this better

curryear={{#expr {{#sub:{{PAGENAME}}|1|4}}}} twodig={{#expr{{#sub:{{PAGENAME}}|6|2}}}} preyear={{#expr curryear-1}} pretwodig={{#expr twodig-1}} Prev=preyear-pretwodig postyear={{#expr curryear+1}} posttwodig={{#expr twodig+1}} Post=postyear-posttwodig