Template:D/formatted

From Gineipaedia, the Legend of Galactic Heroes wiki

Jump to: navigation, search

The text below is a formatted version of the code for {{d}}. This formatted code should allow for easier changes when the template needs to be modified.

Please do not copy this code back into the main template page without first stripping it of its formatting. This can be done in a regexp-supporting text editor (such as Textmate or Sublime Text) by replacing the following regular expression by an empty string: [\t\n]

<includeonly>
	<span class="d">
		{{#if:{{{2|}}}|
			{{#ifeq: {{lc:{{{2|}}}}} | nic | {{{1|}}} [[Calendar era|NIC]]
				<span class="d-other"> 
					<span>(</span>
					{{#expr:{{{1|}}} + 489}} IC /&#32;
					{{#expr:{{{1|}}} + 798}} UC /&#32;
					{{#expr:{{{1|}}} + 3598}} CE
					<span>)</span>
				</span> 
			|}}

			{{#ifeq: {{lc:{{{2|}}}}} | nrc | {{{1|}}} [[Calendar era|NIC]]
				<span class="d-other"> 
					<span>(</span>
					{{#expr:{{{1|}}} + 489}} IC /&#32;
					{{#expr:{{{1|}}} + 798}} UC /&#32;
					{{#expr:{{{1|}}} + 3598}} CE
					<span>)</span>
				</span> 
			|}}

			{{#ifeq: {{lc:{{{2|}}}}} | ic | {{{1|}}} [[Calendar era|IC]]
				<span class="d-other"> 
					<span>(</span>
					{{#ifexpr: {{{1|}}} > 489 | {{#expr:{{{1|}}} - 489}} NIC /&#32;|}}
					{{#expr:{{{1|}}} + 309}} UC /&#32;
					{{#expr:{{{1|}}} + 3109}} CE
					<span>)</span>
				</span> 
			|}}

			{{#ifeq: {{lc:{{{2|}}}}} | rc | {{{1|}}} [[Calendar era|IC]]
				<span class="d-other"> 
					<span>(</span>
					{{#ifexpr: {{{1|}}} > 489 | {{#expr:{{{1|}}} - 489}} NIC /&#32;|}}
					{{#expr:{{{1|}}} + 309}} UC /&#32;
					{{#expr:{{{1|}}} + 3109}} CE
					<span>)</span>
				</span> 
			|}}

			{{#ifeq: {{lc:{{{2|}}}}} | uc | {{{1|}}} [[Calendar era|UC]]
				<span class="d-other"> 
					<span>(</span>
					{{#ifexpr: {{{1|}}} > 798 | {{#expr:{{{1|}}} - 798}} NIC /&#32;|}}
					{{#ifexpr: {{{1|}}} > 309 | {{#expr:{{{1|}}} - 309}} IC /&#32;|}}
					{{#expr:{{{1|}}} + 2800}} CE
					<span>)</span>
				</span> 
			|}}

			{{#ifeq: {{lc:{{{2|}}}}} | ce | {{{1|}}} [[Calendar era|CE]]
				{{#ifexpr:{{{1|}}} > 2800|
					<span class="d-other"> 
						<span>(</span>
						{{#ifexpr: {{{1|}}} > 3598 | {{#expr:{{{1|}}} - 3598}} NIC /&#32;|}}
						{{#ifexpr: {{{1|}}} > 3109 | {{#expr:{{{1|}}} - 3109}} IC /&#32;|}}
						{{#expr:{{{1|}}} - 2800}} UC
						<span>)</span>
					</span> 
				|}} 
			|}}

			|{{{1}}}
		}}
	</span>
</includeonly>
<noinclude>{{documentation}}[[Category:Custom templates]]</noinclude>
Personal tools
Namespaces
Variants
Actions
Miscellany
Common
Tool box