Difference between revisions of "Template:On this day if"

From Co-Optitude Wiki
Jump to navigation Jump to search
Line 12: Line 12:
 
-->{{#vardefine:airDay|{{#time:j|{{{AirDate}}} }} }}<!--
 
-->{{#vardefine:airDay|{{#time:j|{{{AirDate}}} }} }}<!--
 
-->{{#ifexpr: {{LOCALMONTH1}} = {{#var:airMonth}} and {{LOCALDAY}}={{#var:airDay}}|<!-- (if today matches passed M/D)
 
-->{{#ifexpr: {{LOCALMONTH1}} = {{#var:airMonth}} and {{LOCALDAY}}={{#var:airDay}}|<!-- (if today matches passed M/D)
   --><div style="background-color: #eeeeff; border: 1px solid #666699; padding: 1em;"><!--
+
   -->'''On this day'''
    -->On this day in {{#var:airYear}}, <!--
+
 
    -->{{#ifeq:{{#sub:{{{EpNum}}}|0|1}}|F|<!-- (if Flog episode)
+
* '''{{#var:airYear}}''': <!--
      -->{{#vardefine:flogEpNum|{{#expr:1 * {{#sub:{{{EpNum}}}|1}} }} }}<!--
+
  -->{{#ifeq:{{#sub:{{{EpNum}}}|0|1}}|F|<!-- (if Flog episode)
      -->[[The Flog episode {{#var:flogEpNum}}]]<!--
+
    -->{{#vardefine:flogEpNum|{{#expr:1 * {{#sub:{{{EpNum}}}|1}} }} }}<!--
    -->|<!-- (else if Co-Optitude episode)
+
    -->[[The Flog episode {{#var:flogEpNum}}]]<!--
      -->{{#vardefine:coopEpNum|{{#expr:1 * {{{EpNum}}} }} }}<!--
+
  -->|<!-- (else if Co-Optitude episode)
      -->[[Episode {{#var:coopEpNum}}|Co-Optitude episode {{#var:coopEpNum}}]]<!--
+
    -->{{#vardefine:coopEpNum|{{#expr:1 * {{{EpNum}}} }} }}<!--
 +
    -->[[Episode {{#var:coopEpNum}}|Co-Optitude episode {{#var:coopEpNum}}]]<!--
 +
  -->}}<!--
 +
  --> aired featuring <!--
 +
  -->{{#if:{{#explode:{{{Games}}}|;|2}}|<!-- (if 3 games)
 +
    -->'''{{#explode:{{{Games}}}|;|0}}''', '''{{#explode:{{{Games}}}|;|1}}''', and '''{{#explode:{{{Games}}}|;|2}}'''.<!--
 +
    -->|<!-- (else)
 +
    -->{{#if:{{#explode:{{{Games}}}|;|1}}|<!-- (if 2 games)
 +
      -->'''{{#explode:{{{Games}}}|;|0}}''' and '''{{#explode:{{{Games}}}|;|1}}'''.<!--
 +
      (else 1 game) -->|'''{{{Games}}}'''.<!--
 
     -->}}<!--
 
     -->}}<!--
    --> aired featuring <!--
+
  -->}}<!--
    -->{{#if:{{#explode:{{{Games}}}|;|2}}|<!--
 
      (3 games)-->{{#explode:{{{Games}}}|;|0}}, {{#explode:{{{Games}}}|;|1}}, and {{#explode:{{{Games}}}|;|2}}.<!--
 
      (else)-->|<!--
 
      -->{{#if:{{#explode:{{{Games}}}|;|1}}|<!--
 
        (2 games)-->{{#explode:{{{Games}}}|;|0}} and {{#explode:{{{Games}}}|;|1}}.<!--
 
        (else)-->|{{{Games}}}.<!--
 
      -->}}<!--
 
    -->}}<!--
 
  --></div><!--
 
 
-->}}</includeonly>
 
-->}}</includeonly>

Revision as of 08:05, 12 April 2020

Shows a "on this day" block for an episode if today is its air date.

Usage:

{{OnThisDayIf|AirDate=2013-02-18|EpNum=F43|Games=Mortal Kombat; Shaq Fu}}
  • EpNum is a 3-character episode number, like 003 for a Co-Optitude episode or F43 for a Flog episode