Difference between revisions of "Template:Date"

From Stellar Empire
Jump to navigation Jump to search
Tag: Reverted
(Changed range dash to the word 'to')
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
To use this template, utilize <code>&lbrace;&lbrace;date|<em>(int)date</em>&rbrace;&rbrace;</code> to display the template. This will link back to the [[Skywatch Year|Skywatch Calendar]] and link to the year, standardized on the Skywatch Calendar.
<strong>Sample</strong><br/>
<code>&lbrace;&lbrace;date|<em>(int)date</em>|<em>(string)calendar</em>|<em>(boolean)show SY</em>&rbrace;&rbrace;</code>
<table style="width:66%;" border=1px>
<tr><th width="20%" style="text-align:left;">Parameter</th><th width="20%" style="text-align:left;">Type</th><th width="20%" style="text-align:left;">Options/Default</th><th colspan="2" width="40%">Example</th></tr>
<tr><td>date</td><td><code>Integer</code></td><td><span class="color:red">Required</span></td><td>&lbrace;&lbrace;date|3100&rbrace;&rbrace;</td><td>{{date|2300}}</td></tr>
<tr><td>calendar</td><td><code>string</code></td><td>Options: fcc or gu</td><td>&lbrace;&lbrace;date|3100|fcc&rbrace;&rbrace;</td><td>{{date|2300|fcc}}</td></tr>
<tr><td>show</td><td><code>Boolean</code></td><td>Default: TRUE</td><td>&lbrace;&lbrace;date|3100|false&rbrace;&rbrace;</td><td>{{date|2300|fcc|false}}</td></tr>
</table>
</noinclude>
<onlyinclude><includeonly>
{{#switch: {{{2|}}}  
{{#switch: {{{2|}}}  
  | #default = [[Skywatch Year|SY]] [[{{{1}}}]]
  | #default = [[Skywatch Year|SY]] [[{{{1}}}]]
  | fcc = [[Free Colonies Calendar|FCC]] [[{{{1}}}|{{#expr:{{{1}}}-2620}}]] {{#ifeq:{{{3}}} | false | | ([[Skywatch Year|SY]] {{{1}}})}}
  | fcc = [[Free Colonies Calendar|FCC]] [[{{{1}}}|{{#expr:{{{1}}}-2620}}]] {{#ifeq:{{{3}}} | false | | ([[Skywatch Year|SY]] {{{1}}})}}
  | gu = [[Grand Unification|GU]] [[{{{1}}}|{{#expr:{{{1}}}-3197}}]] {{#ifeq:{{{3}}} | true | ([[Skywatch Year|SY]] {{{1}}}) |}}
  | gu = [[Grand Unification|GU]] [[{{{1}}}|{{#expr:({{{1}}}-3269)*3}} to {{#expr:(({{{1}}}-3269)*3)+3}}]] {{#ifeq:{{{3}}} | true | ([[Skywatch Year|SY]] {{{1}}}) }}
| ce = [[Gregorian Calendar|CE]] [[{{{1}}}|{{#expr:({{{1}}}-2900)*5}} to {{#expr:(({{{1}}}-2900)*5)+5}}]] {{#ifeq:{{{3}}} | true | ([[Skywatch Year|SY]] {{{1}}}) |}}
| from = {{#switch: {{{3|}}}
  | ce = [[Gregorian Calendar|CE]] [[{{#expr: 2900 + ({{{1}}}/5) round 5}}|{{{1}}}]] {{#ifeq:{{{4}}} | true | ([[Skywatch Year|SY]] {{#expr: 2900 + ({{{1}}}/5) round 5}}) |}}
  | fcc = [[Free Colonies Calendar|FCC]] [[{{#expr: 2620 + {{{1}}}}}|{{{1}}}]] {{#ifeq:{{{4}}} | true | ([[Skywatch Year|SY]] {{#expr: 2620 + {{{1}}}}}) |}}
  | gu = [[Grand Unification|GU]] [[{{#expr: 3269 + ({{{1}}}/3) round 5}}|{{{1}}}]] {{#ifeq:{{{4}}} | true | ([[Skywatch Year|SY]] {{#expr: 3269 + ({{{1}}}/3) round 5}}) |}}
  }}
}}
}}
</includeonly></onlyinclude>

Latest revision as of 16:34, 9 October 2023

SY [[{{{1}}}]]