Difference between revisions of "Template:Birthday"

From Nookipedia, the Animal Crossing wiki
m (Unprotected "Template:Birthday")
(This looks a little complicated. And it is. It should automatically calculate dates, though)
Line 7: Line 7:
 
|-
 
|-
 
| <small><center>
 
| <small><center>
{{#switch: {{lc:{{{premonth|}}}}}
+
{{#ifexpr:{{{day|1}}}-1 = 0
|january= [[Schedule:Birthdays/January/{{{preday|31}}}|<font color=#000000>←</font> Jan. {{{preday|31}}}]]
+
|{{#ifexpr:{{{month|1}}}-1 = 0
|february= [[Schedule:Birthdays/February/{{{preday|28}}}|<font color=#000000>←</font> February. {{{preday|28}}}]]
+
  |[[Schedule:Birthdays/December/31|<font color=#000000>←</font>Dec .31]]
|march= [[Schedule:Birthdays/March/{{{preday|31}}}|<font color=#000000>←</font> Mar. {{{preday|31}}}]]
+
  |[[Schedule:Birthdays/{{MonthName|{{#expr:{{{month|1}}}-1}}}}/{{#expr:{{{day|1}}}-1}}|<font color=#000000>←</font>{{#expr:{{{month|1}}}-1}}|y}}. {{#expr:{{{day|1}}}-1}}]]
|april= [[Schedule:Birthdays/April/{{{preday|30}}}|<font color=#000000>←</font> Apr. {{{preday|30}}}]]
+
}}
|may= [[Schedule:Birthdays/May/{{{preday|31}}}|<font color=#000000>←</font> May {{{preday|31}}}]]
+
|[[Schedule:Birthdays/{{MonthName|<font color=#000000>←</font>{{{month|1}}}}}/{{#expr:{{{day|1}}}-1}}|{{MonthName|{{{month|1}}}|y}}. {{#expr:{{{day|1}}}-1}}]]
|june= [[Schedule:Birthdays/June/{{{preday|30}}}|<font color=#000000>←</font> June {{{preday|30}}}]]
+
}} <nowiki>|</nowiki> <!--
|july= [[Schedule:Birthdays/July/{{{preday|31}}}|<font color=#000000>←</font> July {{{preday|31}}}]]
+
 
|august= [[Schedule:Birthdays/August/{{{preday|31}}}|<font color=#000000>←</font> Aug. {{{preday|31}}}]]
+
 
|september= [[Schedule:Birthdays/September/{{{preday|30}}}|<font color=#000000>←</font> Sep. {{{preday|30}}}]]
+
-->'''{{MonthName|{{{month|1}}}|y}} {{{day|1}}}''' <nowiki>|</nowiki> <!--
|october= [[Schedule:Birthdays/October/{{{preday|31}}}|<font color=#000000>←</font> Oct. {{{preday|31}}}]]
+
 
|november= [[Schedule:Birthdays/November/{{{preday|30}}}|<font color=#000000>←</font> Nov. {{{preday|30}}}]]
+
 
|december= [[Schedule:Birthdays/December/{{{preday|31}}}|<font color=#000000>←</font> Dec. {{{preday|31}}}]]
+
-->{{#ifexpr: {{{day|1}}}+1 > {{MonthLength|{{{month|1}}}}}
|[[Schedule:Birthdays/December/{{{preday|31}}}|<font color=#000000>←</font> Dec. {{{preday|31}}}]]
+
|{{#ifexpr:{{{month|1}}}+1 > 12
}} <nowiki>|</nowiki> {{#switch: {{lc:{{{curmonth|}}}}}
+
  |[[Schedule:Birthdays/January/1|Jan. 1<font color=#000000>→</font>]]
|january= '''Jan. {{{curday|1}}}'''
+
  |[[Schedule:Birthdays/{{MonthName|{{#expr:{{{month|1}}}+1}}}}/1|{{MonthName|{{#expr:{{{month|1}}}+1}}|y}}. 1<font color=#000000>→</font>]]
|february= '''Feb. {{{curday|1}}}'''
+
}}
|march= '''Mar. {{{curday|1}}}'''
+
|[[Schedule:Birthdays/{{MonthName|{{{month|1}}}}}/{{#expr:{{{day|1}}}+1}}|{{MonthName|{{{month|1}}}|y}}. {{#expr:{{{day|1}}}+1}}<font color=#000000>→</font>]]
|april= '''Apr. {{{curday|1}}}'''
 
|may= '''May {{{curday|1}}}'''
 
|june= '''June {{{curday|1}}}'''
 
|july= '''July {{{curday|1}}}'''
 
|august= '''Aug. {{{curday|1}}}'''
 
|september= '''Sep. {{{curday|1}}}'''
 
|october= '''Oct. {{{curday|1}}}'''
 
|november= '''Nov. {{{curday|1}}}'''
 
|december= '''Dec. {{{curday|1}}}'''
 
|'''Jan. {{{curday|1}}}'''
 
}} <nowiki>|</nowiki> {{#switch: {{lc:{{{nextmonth|}}}}}
 
|january= [[Schedule:Birthdays/January/{{{nextday|2}}}|Jan. {{{nextday|2}}} <font color=#000000>→</font>]]
 
|february= [[Schedule:Birthdays/February/{{{nextday|2}}}|February. {{{nextday|2}}} <font color=#000000>→</font>]]
 
|march= [[Schedule:Birthdays/March/{{{nextday|2}}}|Mar. {{{nextday|2}}} <font color=#000000>→</font>]]
 
|april= [[Schedule:Birthdays/April/{{{nextday|2}}}|Apr. {{{nextday|2}}} <font color=#000000>→</font>]]
 
|may= [[Schedule:Birthdays/May/{{{nextday|2}}}|May {{{nextday|2}}} <font color=#000000>→</font>]]
 
|june= [[Schedule:Birthdays/June/{{{nextday|2}}}|June {{{nextday|2}}} <font color=#000000>→</font>]]
 
|july= [[Schedule:Birthdays/July/{{{nextday|2}}}|July {{{nextday|2}}} <font color=#000000>→</font>]]
 
|august= [[Schedule:Birthdays/August/{{{nextday|2}}}|Aug. {{{nextday|2}}} <font color=#000000>→</font>]]
 
|september= [[Schedule:Birthdays/September/{{{nextday|2}}}|Sep. {{{preday|2}}} <font color=#000000>→</font>]]
 
|october= [[Schedule:Birthdays/October/{{{nextday|2}}}|Oct. {{{preday|2}}} <font color=#000000>→</font>]]
 
|november= [[Schedule:Birthdays/November/{{{nextday|2}}}|Nov. {{{preday|2}}} <font color=#000000>→</font>]]
 
|december= [[Schedule:Birthdays/December/{{{nextday|2}}}|Dec. {{{preday|2}}} <font color=#000000>→</font>]]
 
|[[Schedule:Birthdays/January/{{{nextday|2}}}|Jan. {{{preday|2}}} <font color=#000000>→</font>]]
 
 
}}</center></small>
 
}}</center></small>
|}
+
|}<noinclude>
<noinclude><pre>
+
 
 +
<pre>
 
{{Birthday
 
{{Birthday
 
|name=
 
|name=
 
|image=
 
|image=
 
|size=
 
|size=
|premonth=
+
|month=
|preday=
+
|day=
|curmonth=
 
|curday=
 
|nextmonth=
 
|nextday=
 
 
}}</pre></noinclude>
 
}}</pre></noinclude>

Revision as of 17:24, July 6, 2011

Today is Bob's birthday!
More on Bob...
Dec .31 | Jan 1 | Jan. 2
{{Birthday
|name=
|image=
|size=
|month=
|day=
}}