From GamingWiki
Jump to: navigation, search
Line 1: Line 1:
{| class="infobox vevent" style="font-size: 90%; width: 20em; background: white"
+
<!--
 +
 
 +
VARIABLES
 +
 
 +
  Create a variable to hold the year number.
 +
-->{{#vardefine: theyear|<!--
 +
  -->{{#ifeq:{{{1}}}|BC<!--
 +
      -->|{{PAGENAME}}<!--
 +
      -->|{{{year|<!-- Conditional default value:
 +
        --><noinclude>{{CURRENTYEAR}}</noinclude><!--
 +
        --><includeonly>{{PAGENAME}}</includeonly><!--
 +
      -->}}}<!--
 +
  -->}}<!-- end ifeq
 +
-->}}<!--
 +
 
 +
--><noinclude>
 +
:<!--
 +
--> We support multiple calendars, if they exist. Calendar definitions are <!--
 +
--> stored in subtemplates. If the 'campaign' parameter has been          <!--
 +
--> specified, and if                                                      <!--
 +
--> <tt>Template:Year in other calendars/{{{campaign}}}</tt> exists, then  <!--
 +
--> we transclude it. If {{{campaign}}} is unset or the template does not  <!--
 +
--> exist, we use <tt>Template:Year in other calendars/default</tt>.      <!--
 +
--></noinclude><!--
 +
-->{{#vardefine: calendars| Year in other calendars/<!--
 +
  If we've specified a campaign, look for that campaign's subtemplate.
 +
  -->{{#ifexist: Template:Year in other calendars/{{{campaign|MAGIC_DNE}}}<!--
 +
      -->|{{{campaign}}}<!--
 +
      -->|default<!--
 +
  -->}}<!-- end ifexist
 +
-->}}<!-- end vardefine
 +
--><!-- {{ {{#var:calendars}}|year={{#var:theyear}}}} --><!--
 +
 
 +
--><noinclude>
 +
:<!--
 +
--> The data in the subtemplate is parsed into a HashTable. The keys are  <!--
 +
--> links to pages describing individual calendars, and the values are    <!--
 +
--> years (or year ranges, as appropriate) in the alternate calendar. The  <!--
 +
--> The format of the data is as follows:
 +
<pre>
 +
;; [[calendar 1]] :: {{#perform_calculation_on|{{{year}}}}}
 +
;; [[calendar 2]] :: {{{year}}}
 +
</pre></noinclude><!--
 +
 
 +
-->{{#vardefine: caldata|{{ {{#var: calendars}}|year={{#var:theyear}}}}}}<!--
 +
 
 +
-->{{#hashdefine: datahash | {{#var:caldata}} | ;; | :: }}<!--
 +
  Remove empty keys:
 +
-->{{#hashexclude: datahash | }}<!--
 +
 
 +
-->
 +
 
 +
{| class="infobox" width="300" <!--
 +
--><!-- {| class="infobox vevent" style="font-size: 90%; width: 20em; background: white" --><!--
 +
-->
 
|+ style="font-size: 135%;" | '''<span class="summary dtstart">{{#ifeq:{{{1}}}|BC|{{PAGENAME}}|{{{year|<noinclude>{{CURRENTYEAR}}</noinclude><includeonly>{{PAGENAME}}</includeonly>}}}}}</span> in other calendars'''
 
|+ style="font-size: 135%;" | '''<span class="summary dtstart">{{#ifeq:{{{1}}}|BC|{{PAGENAME}}|{{{year|<noinclude>{{CURRENTYEAR}}</noinclude><includeonly>{{PAGENAME}}</includeonly>}}}}}</span> in other calendars'''
 
|-
 
|-

Revision as of 17:38, 20 February 2011

We support multiple calendars, if they exist. Calendar definitions are stored in subtemplates. If the 'campaign' parameter has been specified, and if Template:Year in other calendars/{{{campaign}}} exists, then we transclude it. If {{{campaign}}} is unset or the template does not exist, we use Template:Year in other calendars/default.
The data in the subtemplate is parsed into a HashTable. The keys are links to pages describing individual calendars, and the values are years (or year ranges, as appropriate) in the alternate calendar. The The format of the data is as follows:
 ;; [[calendar 1]] :: {{#perform_calculation_on|{{{year}}}}}
 ;; [[calendar 2]] :: {{{year}}}
2026 in other calendars
Gregorian calendar 2026
MMXXVI
Ab urbe condita 2779
Bahá'í calendar 182 – 183
Bengali calendar 1433
Berber calendar 2976
Buddhist calendar 2570
Burmese calendar 1388
Byzantine calendar 7534 – 7535
Coptic calendar 1742 – 1743
Ethiopian calendar 2018 – 2019
Hebrew calendar 5786 – 5787
Holocene calendar 12026
Iranian calendar 1404 – 1405
Islamic calendar 1447 – 1448
Korean calendar 4359
Thai solar calendar 2569
Unix time 1767225600 – 1798761599
[create]
Error creating thumbnail: File missing
Template documentation