Difference between revisions of "Template:Updates/core"

From Team Fortress Wiki
Jump to: navigation, search
m (Protected "Template:Latest patch": High traffic page ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
(Renamed parameters, change date calculations to server time (Not UTC, open for discussion), made code easier to read)
Line 1: Line 1:
 
<div align="right" style="right:25px; top: 14px; display:none; font-size:1em; font-style: italic;" class="topicon">
 
<div align="right" style="right:25px; top: 14px; display:none; font-size:1em; font-style: italic;" class="topicon">
[[File:Tf2-logo-transparent.png|18px|link=Patches]] The latest [[Patches|patch]] was on '''[[{{#switch: {{{MONTH}}}
+
[[File:Tf2-logo-transparent.png|18px|link=Patches|top]] The latest [[Patches|patch]] was on '''[[{{#switch: {{{patch-month}}}
|1=January
+
| 1 = January
|2=February
+
| 2 = February
|3=March
+
| 3 = March
|4=April
+
| 4 = April
|5=May
+
| 5 = May
|6=June
+
| 6 = June
|7=July
+
| 7 = July
|8=August
+
| 8 = August
|9=September
+
| 9 = September
|10=October
+
| 10 = October
|11=November
+
| 11 = November
|12=December}} {{{DAY}}}, {{#switch: {{{YEAR}}}
+
| 12 = December}} {{{patch-day}}}, <!--
|10=2010
+
 
|09=2009
+
--> {{#switch: {{{patch-year}}}
|08=2008}} Patch|{{#switch: {{{MONTH}}}
+
| 10 = 2010
|1=January
+
| 09 = 2009
|2=February
+
| 08 = 2008}} Patch | {{#switch: {{{patch-month}}}
|3=March
+
| 1 = January
|4=April
+
| 2 = February
|5=May
+
| 3 = March
|6=June
+
| 4 = April
|7=July
+
| 5 = May
|8=August
+
| 6 = June
|9=September
+
| 7 = July
|10=October
+
| 8 = August
|11=November
+
| 9 = September
|12=December}} {{{DAY}}}, {{#switch: {{{YEAR}}}
+
| 10 = October
|10=2010
+
| 11 = November
|09=2009
+
| 12 = December}} {{{patch-day}}}, <!--
|08=2008}}]] {{#ifexpr: {{CURRENTMONTH}}>{{{MONTH}}}||<small>({{#expr:{{CURRENTDAY}}-{{{DAY}}}}} day{{#ifexpr:{{CURRENTDAY}}-{{{DAY}}}=1||s}} ago)</small>}}'''
+
 
 +
--> {{{patch-year}}}]] <!--
 +
 
 +
--> {{#ifexpr:{{LOCALMONTH}}<{{{patch-month}}}|<small>({{#ifexpr:{{{patch-day}}}={{LOCALDAY}}|Today|{{#expr:{{LOCALDAY}}-{{{patch-day}}}}} day{{plural:{{LOCALDAY}}-{{{patch-day}}}||s}} ago}})</small>}}'''
 
<br>
 
<br>
[[File:Tf2-logo-transparent.png|18px|link=TF2 Official Blog]] The [[TF2 Official Blog|blog]] was last updated on '''<span class="plainlinks">[http://www.tf2.com/post.php?id={{{BID}}} {{#switch: {{{BMONTH}}}
+
[[File:Tf2-logo-transparent.png|18px|link=TF2 Official Blog|top]] The [[TF2 Official Blog|blog]] was last updated on '''<span class="plainlinks">[http://www.teamfortress.com/post.php?id={{{blog-id}}} {{#switch: {{{blog-month}}}
|1=January
+
| 1 = January
|2=February
+
| 2 = February
|3=March
+
| 3 = March
|4=April
+
| 4 = April
|5=May
+
| 5 = May
|6=June
+
| 6 = June
|7=July
+
| 7 = July
|8=August
+
| 8 = August
|9=September
+
| 9 = September
|10=October
+
| 10 = October
|11=November
+
| 11 = November
|12=December}} {{{BDAY}}}, {{#switch: {{{BYEAR}}}
+
| 12 = December}} {{{blog-day}}}, <!--
|11=2011
+
 
|10=2010
+
--> {{{blog-year}}}]</span> <!--
|09=2009
+
 
|08=2008}}] {{#ifexpr: {{CURRENTMONTH}}>{{{BMONTH}}}||<small>({{#expr:{{CURRENTDAY}}-{{{BDAY}}}}} day{{#ifexpr:{{CURRENTDAY}}-{{{BDAY}}}=1||s}} ago)</small>}}</span>'''
+
--> {{#ifexpr:{{LOCALMONTH}}<{{{blog-month}}}|<small>({{#ifexpr:{{{blog-day}}}={{LOCALDAY}}|Today|{{#expr:{{LOCALDAY}}-{{{blog-day}}}}} day{{plural:{{LOCALDAY}}-{{{blog-day}}}||s}} ago}})</small>}}'''
 
</div>
 
</div>

Revision as of 03:30, 18 July 2010