This template is protected from editing.

Difference between revisions of "Template:Is event"

From Team Fortress Wiki
Jump to: navigation, search
m (+ TF Birthday)
m (ops!)
Line 1: Line 1:
 
<includeonly>{{#switch: {{CURRENTMONTH1}}
 
<includeonly>{{#switch: {{CURRENTMONTH1}}
  | 01 = {{#ifeq: {{#expr: {{CURRENTDAY2}} <= 07 }} | 1 | Smissmas | None }}
+
  | 01 = {{#ifexpr: {{CURRENTDAY2}} <= 07 | Smissmas | None }}
 
  | 12 = Smissmas
 
  | 12 = Smissmas
 
  | 10 = Scream Fortress
 
  | 10 = Scream Fortress
  | 11 = {{#ifeq: {{#expr: {{CURRENTDAY2}} <= 07 }} | 1 | Scream Fortress | None }}
+
  | 11 = {{#ifexpr: {{CURRENTDAY2}} <= 07 | Scream Fortress | None }}
  | 08 = {{#expr: {{CURRENTDAY2}} >= 23 and {{CURRENTDAY2}} <= 25 }} | 1 | TF Birthday | None }}
+
  | 08 = {{#ifexpr: {{CURRENTDAY2}} >= 23 and {{CURRENTDAY2}} <= 25 | TF Birthday | None }}
 
  | #default = None
 
  | #default = None
 
}}
 
}}

Revision as of 22:38, 18 September 2021

Documentation for Is event

Usage

This template returns if the current month matches an in-game event (Smissmas or Halloween):

{{is event}}

Examples:

  • {{is event}} (from Oct 01 to Nov 07) returns Scream Fortress
  • {{is event}} (from Dec 01 to Jan 07) returns Smissmas
  • {{is event}} (from Aug 23 to Aug 25) returns TF Birthday
  • {{is event}} currently returns None

  • {{is event}} defaults to None