Difference between revisions of "Template:CalFillMarch"

From Nookipedia, the Animal Crossing wiki
(Added info on Bunny Day from reference: http://tlarsen2.tripod.com/thomaslarsen/easterdates.html)
 
(12 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{#vardefine:curYear|{{{year|{{LOCALYEAR}}}}}}}
+
{{#vardefine:curYear|{{{year|{{LOCALYEAR}}}}}}}<!--
{{#vardefine:firstDay|{{#time:l|01 March {{#var:curYear}}}}}}
+
-->{{#vardefine:firstDay|{{#time:l|01 March {{#var:curYear}}}}}}<!--
{{Calendar
+
-->{{#vardefine:firstDayNum|{{#time:w|01 March {{#var:curYear}}}}}}<!--
 +
-->{{Calendar
 
|year = {{#var:curYear}}
 
|year = {{#var:curYear}}
 
|month = March
 
|month = March
|01 = {{#switch: {{#var:curYear}} | 2049 = <center>'''[[Festivale]]'''</center>}}<!--
+
|<!--01-->{{#ifeq:{{#var:firstDayNum}}|0|0|{{#time:d|{{#var:firstDayNum}} March {{#var:curYear}}}}}} = {{#switch: {{#var:curYear}} | 2049 = <div style="margin: 0 auto; text-align: center;">'''[[Festivale]]'''</div>}}<!--
-->{{#ifeq: {{#var:firstDay}} | Saturday | <center>'''[[Flea Market]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Saturday | <div style="margin: 0 auto; text-align: center;">'''[[Flea Market]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Coco]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Coco]]'s birthday</li></ul></small>
|02 = <center>'''[[Weeding Day]]''' <small>({{NL|shortest|nolink}}){{KR}}</small></center><!--
+
|<!--02-->{{#time:d|{{#expr:{{#var:firstDayNum}} + 1}} March {{#var:curYear}}}} = <center>'''[[Weeding Day]]''' <small>({{NL|shortest|nolink}})<br>{{Flag|KOR|text=South Korea only}}</small></center><!--
-->{{#ifeq: {{#var:firstDay}} | Friday | <center>'''[[Flea Market]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Friday | <div style="margin: 0 auto; text-align: center;">'''[[Flea Market]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Barold]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Barold]]'s birthday</li></ul></small>
|03 = <center>'''[[Girl's Festival]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}}){{JP}}</small></center><!--
+
|<!--03-->{{#time:d|{{#expr:{{#var:firstDayNum}} + 2}} March {{#var:curYear}}}} = <center>'''[[Girl's Festival]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})<br>{{Flag|JPN|text=Japan only}}</small></center><!--
-->{{#switch: {{#var:curYear}} | 2014 | 2025 = <center>'''[[Festivale]]'''</center>}}<!--
+
-->{{#switch: {{#var:curYear}} | 2014 | 2025 = <div style="margin: 0 auto; text-align: center;">'''[[Festivale]]'''</div>}}<!--
-->{{#ifeq: {{#var:firstDay}} | Thursday | <center>'''[[Flea Market]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Thursday | <div style="margin: 0 auto; text-align: center;">'''[[Flea Market]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Bonbon]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Bonbon]]'s birthday</li></ul></small>
|04 = {{#switch: {{#var:curYear}} | 2019 | 2030 | 2041 = <center>'''[[Festivale]]'''</center>}}<!--
+
|<!--04-->{{#time:d|{{#expr:{{#var:firstDayNum}} + 3}} March {{#var:curYear}}}} = {{#switch: {{#var:curYear}} | 2019 | 2030 | 2041 = <div style="margin: 0 auto; text-align: center;">'''[[Festivale]]'''</div>}}<!--
-->{{#ifeq: {{#var:firstDay}} | Wednesday | <center>'''[[Flea Market]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Wednesday | <div style="margin: 0 auto; text-align: center;">'''[[Flea Market]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Anchovy]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Anchovy]]'s birthday</li></ul></small>
|05 = {{#ifeq: {{#var:firstDay}} | Tuesday | <center>'''[[Flea Market]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
|<!--05-->{{#time:d|{{#expr:{{#var:firstDayNum}} + 4}} March {{#var:curYear}}}} = {{#ifeq: {{#var:firstDay}} | Tuesday | <div style="margin: 0 auto; text-align: center;">'''[[Flea Market]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Gala]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Gala]]'s birthday</li></ul></small>
|06 = {{#ifeq: {{#var:firstDay}} | Monday | <center>'''[[Flea Market]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
|<!--06-->{{#time:d|{{#expr:{{#var:firstDayNum}} + 5}} March {{#var:curYear}}}} = {{#ifeq: {{#var:firstDay}} | Monday | <div style="margin: 0 auto; text-align: center;">'''[[Flea Market]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Chevre]]'s birthday</li><li>[[Chai]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Chevre]]'s birthday</li><li>[[Chai]]'s birthday</li></ul></small>
|07 = {{#ifeq: {{#var:firstDay}} | Sunday | <center>'''[[Flea Market]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
|<!--07-->{{#time:d|{{#expr:{{#var:firstDayNum}} + 6}} March {{#var:curYear}}}} = {{#ifeq: {{#var:firstDay}} | Sunday | <div style="margin: 0 auto; text-align: center;">'''[[Flea Market]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
--><small><ul><li>[[Molly]]'s birthday</li></ul></small>
+
--><small><ul><li>[[Molly]]'s birthday</li><li>[[C.J.]]'s birthday</li></ul></small>
|08 = {{#switch: {{#var:curYear}} | 2038 = <center>'''[[Festivale]]'''</center>}}<!--
+
|<!--08-->{{#time:d|{{#expr:{{#var:firstDayNum}} + 7}} March {{#var:curYear}}}} = {{#switch: {{#var:curYear}} | 2038 = <div style="margin: 0 auto; text-align: center;">'''[[Festivale]]'''</div>}}<!--
-->{{#ifeq: {{#var:firstDay}} | Saturday | <center>'''[[La-Di-Day]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Saturday | <div style="margin: 0 auto; text-align: center;">'''[[La-Di-Day]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Zucker]]'s birthday</li><li>[[Pete]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Zucker]]'s birthday</li><li>[[Pete]]'s birthday</li></ul></small>
|09 = {{#ifeq: {{#var:firstDay}} | Friday | <center>'''[[La-Di-Day]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
|<!--09-->{{#time:d|{{#expr:{{#var:firstDayNum}} + 8}} March {{#var:curYear}}}} = {{#ifeq: {{#var:firstDay}} | Friday | <div style="margin: 0 auto; text-align: center;">'''[[La-Di-Day]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Cyrano]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Cyrano]]'s birthday</li></ul></small>
|10 = {{#ifeq: {{#var:firstDay}} | Thursday | <center>'''[[La-Di-Day]]''' <small>({{WW|shortest|nolink}})</small></center>}}
+
|<!--10-->{{#time:d|{{#expr:{{#var:firstDayNum}} + 9}} March {{#var:curYear}}}} = {{#ifeq: {{#var:firstDay}} | Thursday | <div style="margin: 0 auto; text-align: center;">'''[[La-Di-Day]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
|11 = {{#ifeq: {{#var:firstDay}} | Wednesday | <center>'''[[La-Di-Day]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
--><small><ul><li>[[Judy]]'s birthday</li></ul></small>
 +
|<!--11-->{{#expr:{{#var:firstDayNum}} + 10}} = {{#ifeq: {{#var:firstDay}} | Wednesday | <div style="margin: 0 auto; text-align: center;">'''[[La-Di-Day]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Hopkins]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Hopkins]]'s birthday</li></ul></small>
|12 = {{#ifeq: {{#var:firstDay}} | Tuesday | <center>'''[[La-Di-Day]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
|<!--12-->{{#expr:{{#var:firstDayNum}} + 11}} = {{#ifeq: {{#var:firstDay}} | Tuesday | <div style="margin: 0 auto; text-align: center;">'''[[La-Di-Day]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Midge]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Midge]]'s birthday</li></ul></small>
|13 = {{#ifeq: {{#var:firstDay}} | Monday | <center>'''[[La-Di-Day]]''' <small>({{WW|shortest|nolink}})</small></center>}}
+
|<!--13-->{{#expr:{{#var:firstDayNum}} + 12}} = {{#ifeq: {{#var:firstDay}} | Monday | <div style="margin: 0 auto; text-align: center;">'''[[La-Di-Day]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
|14 = {{#ifeq: {{#var:firstDay}} | Sunday | <center>'''[[La-Di-Day]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
--><small><ul><li>[[Megan]]'s birthday</li></ul></small>
 +
|<!--14-->{{#expr:{{#var:firstDayNum}} + 13}} = {{#ifeq: {{#var:firstDay}} | Sunday | <div style="margin: 0 auto; text-align: center;">'''[[La-Di-Day]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Dotty]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Dotty]]'s birthday</li></ul></small>
|15 = {{#ifeq: {{#var:firstDay}} | Sunday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
|<!--15-->{{#expr:{{#var:firstDayNum}} + 14}} = {{#ifeq: {{#var:firstDay}} | Sunday | <div style="margin: 0 auto; text-align: center;">'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
-->{{#ifeq: {{#var:firstDay}} | Saturday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Saturday | <div style="margin: 0 auto; text-align: center;">'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Julian]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Julian]]'s birthday</li></ul></small>
|16 = {{#ifeq: {{#var:firstDay}} | Saturday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
|<!--16-->{{#expr:{{#var:firstDayNum}} + 15}} = {{#ifeq: {{#var:firstDay}} | Saturday | <div style="margin: 0 auto; text-align: center;">'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
-->{{#ifeq: {{#var:firstDay}} | Friday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Friday | <div style="margin: 0 auto; text-align: center;">'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Doc]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Doc]]'s birthday</li></ul></small>
|17 = <center>'''[[Shamrock Day]]''' <small>({{NL|shortest|nolink}})<sup>{{tt|NA, EU|North America and Europe}}</sup></small></center><!--
+
|<!--17-->{{#expr:{{#var:firstDayNum}} + 16}} = <center>'''[[Shamrock Day]]''' <small>({{NL|shortest|nolink}})<br>{{Flag|USA|text=USA only}} {{Flag|EUR|text=Europe only}}</small></center><!--
-->{{#ifeq: {{#var:firstDay}} | Friday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Friday | <div style="margin: 0 auto; text-align: center;">'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
-->{{#ifeq: {{#var:firstDay}} | Thursday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Thursday | <div style="margin: 0 auto; text-align: center;">'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Cheri]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Cheri]]'s birthday</li></ul></small>
|18 = {{#ifeq: {{#var:firstDay}} | Thursday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
|<!--18-->{{#expr:{{#var:firstDayNum}} + 17}} = {{#ifeq: {{#var:firstDay}} | Thursday | <div style="margin: 0 auto; text-align: center;">'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
-->{{#ifeq: {{#var:firstDay}} | Wednesday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}
+
-->{{#ifeq: {{#var:firstDay}} | Wednesday | <div style="margin: 0 auto; text-align: center;">'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></div>}}<!--
|19 = <center>'''[[Father's Day]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})<sup>{{tt|EU (IT,SP)|Europe (Italian, Spanish)}}</sup></small></center><!--
+
--><small><ul><li>[[Dom]]'s birthday</li></ul></small>
-->{{#ifeq: {{#var:firstDay}} | Wednesday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
|<!--19-->{{#expr:{{#var:firstDayNum}} + 18}} = <center>'''[[Father's Day]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})<br>{{Flag|ITA|text=Italy only}} {{Flag|ESP|text=Spain only}}</small></center><!--
-->{{#ifeq: {{#var:firstDay}} | Tuesday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Wednesday | <div style="margin: 0 auto; text-align: center;">'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
 +
-->{{#ifeq: {{#var:firstDay}} | Tuesday | <div style="margin: 0 auto; text-align: center;">'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Merengue]]'s birthday</li><li>[[Pelly]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Merengue]]'s birthday</li><li>[[Pelly]]'s birthday</li></ul></small>
|20 = <center>'''[[Spring Sports Fair]]''' <small>({{PG|shortest|nolink}})</small></center><!--
+
|<!--20-->{{#expr:{{#var:firstDayNum}} + 19}} = <center>'''[[Spring Sports Fair]]''' <small>({{PG|shortest|nolink}})</small></center><!--
-->{{#ifeq: {{#var:firstDay}} | Tuesday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Tuesday | <div style="margin: 0 auto; text-align: center;">'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
-->{{#ifeq: {{#var:firstDay}} | Monday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Monday | <div style="margin: 0 auto; text-align: center;">'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Hornsby]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Hornsby]]'s birthday</li></ul></small>
|21 = <center>'''[[Spring Sports Fair]]''' <small>({{PG|shortest|nolink}})</small></center><!--
+
|<!--21-->{{#expr:{{#var:firstDayNum}} + 20}} = <center>'''[[Spring Sports Fair]]''' <small>({{PG|shortest|nolink}})</small></center><!--
-->{{#ifeq: {{#var:firstDay}} | Monday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Monday | <div style="margin: 0 auto; text-align: center;">'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></div>}}<!--
-->{{#ifeq: {{#var:firstDay}} | Sunday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Sunday | <div style="margin: 0 auto; text-align: center;">'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></div>}}<!--
--><small><ul><li>[[Elise]]'s birthday</li></ul></small>
+
--><small><ul><li>[[Elise]]'s birthday</li><li>[[Faith]]'s birthday</li></ul></small>
|22 = {{#ifeq: {{#var:firstDay}} | Sunday | <center>'''[[Yay Day]]''' <small>({{WW|shortest|nolink}})</small></center> <center>'''[[Flea Market]]''' <small>({{CF|shortest|nolink}})</small></center>}}<!--
+
|<!--22-->{{#expr:{{#var:firstDayNum}} + 21}} = {{#ifeq: {{#var:firstDay}} | Sunday | <div style="margin: 0 auto; text-align: center;">'''[[Yay Day]]''' <small>({{WW|shortest|nolink}})</small></center> <center>'''[[Flea Market]]''' <small>({{CF|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Paula]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Paula]]'s birthday</li></ul></small>
|23 = {{#switch: {{#var:curYear}} | 2008 = <center>'''[[Bunny Day]]'''</center>}}<!--
+
|<!--23-->{{#expr:{{#var:firstDayNum}} + 22}} = {{#switch: {{#var:curYear}} | 2008 = <div style="margin: 0 auto; text-align: center;">'''[[Bunny Day]]'''</div>}}<!--
-->{{#ifeq: {{#var:firstDay}} | Saturday | <center>'''[[Yay Day]]''' <small>({{WW|shortest|nolink}})</small></center> <center>'''[[Flea Market]]''' <small>({{CF|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Saturday | <div style="margin: 0 auto; text-align: center;">'''[[Yay Day]]''' <small>({{WW|shortest|nolink}})</small></center> <center>'''[[Flea Market]]''' <small>({{CF|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Axel]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Axel]]'s birthday</li></ul></small>
|24 = {{#ifeq: {{#var:firstDay}} | Friday | <center>'''[[Yay Day]]''' <small>({{WW|shortest|nolink}})</small></center> <center>'''[[Flea Market]]''' <small>({{CF|shortest|nolink}})</small></center>}}<!--
+
|<!--24-->{{#expr:{{#var:firstDayNum}} + 23}} = {{#ifeq: {{#var:firstDay}} | Friday | <div style="margin: 0 auto; text-align: center;">'''[[Yay Day]]''' <small>({{WW|shortest|nolink}})</small></center> <center>'''[[Flea Market]]''' <small>({{CF|shortest|nolink}})</small></div>}}<!--
--><small><ul><li>[[Skye]]'s birthday</li><li>[[Carmen (mouse)|Carmen]]'s birthday</li></ul></small>
+
--><small><ul><li>[[Skye]]'s birthday</li></ul></small>
|25 = {{#switch: {{#var:curYear}} | 2035 | 2046 = <center>'''[[Bunny Day]]'''</center>}}<!--
+
|<!--25-->{{#expr:{{#var:firstDayNum}} + 24}} = {{#switch: {{#var:curYear}} | 2035 | 2046 = <div style="margin: 0 auto; text-align: center;">'''[[Bunny Day]]'''</div>}}<!--
-->{{#ifeq: {{#var:firstDay}} | Thursday | <center>'''[[Yay Day]]''' <small>({{WW|shortest|nolink}})</small></center> <center>'''[[Flea Market]]''' <small>({{CF|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Thursday | <div style="margin: 0 auto; text-align: center;">'''[[Yay Day]]''' <small>({{WW|shortest|nolink}})</small></center> <center>'''[[Flea Market]]''' <small>({{CF|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Celia]]'s birthday</li><li>[[Billy]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Celia]]'s birthday</li><li>[[Billy]]'s birthday</li></ul></small>
|26 = {{#ifeq: {{#var:firstDay}} | Wednesday | <center>'''[[Yay Day]]''' <small>({{WW|shortest|nolink}})</small></center> <center>'''[[Flea Market]]''' <small>({{CF|shortest|nolink}})</small></center>}}<!--
+
|<!--26-->{{#expr:{{#var:firstDayNum}} + 25}} = {{#ifeq: {{#var:firstDay}} | Wednesday | <div style="margin: 0 auto; text-align: center;">'''[[Yay Day]]''' <small>({{WW|shortest|nolink}})</small></center> <center>'''[[Flea Market]]''' <small>({{CF|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Fauna]]'s birthday</li><li>[[Louie]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Fauna]]'s birthday</li><li>[[Louie]]'s birthday</li></ul></small>
|27 = {{#switch: {{#var:curYear}} | 2016 | 2027 = <center>'''[[Bunny Day]]'''</center>}}<!--
+
|<!--27-->{{#expr:{{#var:firstDayNum}} + 26}} = {{#switch: {{#var:curYear}} | 2016 | 2027 = <div style="margin: 0 auto; text-align: center;">'''[[Bunny Day]]'''</div>}}<!--
-->{{#ifeq: {{#var:firstDay}} | Tuesday | <center>'''[[Yay Day]]''' <small>({{WW|shortest|nolink}})</small></center> <center>'''[[Flea Market]]''' <small>({{CF|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Tuesday | <div style="margin: 0 auto; text-align: center;">'''[[Yay Day]]''' <small>({{WW|shortest|nolink}})</small></center> <center>'''[[Flea Market]]''' <small>({{CF|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Lolly]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Lolly]]'s birthday</li></ul></small>
|28 = {{#switch: {{#var:curYear}} | 2032 = <center>'''[[Bunny Day]]'''</center>}}<!--
+
|<!--28-->{{#expr:{{#var:firstDayNum}} + 27}} = {{#switch: {{#var:curYear}} | 2032 = <div style="margin: 0 auto; text-align: center;">'''[[Bunny Day]]'''</div>}}<!--
-->{{#ifeq: {{#var:firstDay}} | Monday | <center>'''[[Yay Day]]''' <small>({{WW|shortest|nolink}})</small></center> <center>'''[[Flea Market]]''' <small>({{CF|shortest|nolink}})</small></center>}}<!--
+
-->{{#ifeq: {{#var:firstDay}} | Monday | <div style="margin: 0 auto; text-align: center;">'''[[Yay Day]]''' <small>({{WW|shortest|nolink}})</small></center> <center>'''[[Flea Market]]''' <small>({{CF|shortest|nolink}})</small></div>}}<!--
 
--><small><ul><li>[[Baabara]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Baabara]]'s birthday</li></ul></small>
|29 = {{#switch: {{#var:curYear}} | 2043 = <center>'''[[Bunny Day]]'''</center>}}<!--
+
|<!--29-->{{#expr:{{#var:firstDayNum}} + 28}} = {{#switch: {{#var:curYear}} | 2043 = <div style="margin: 0 auto; text-align: center;">'''[[Bunny Day]]'''</div>}}<!--
 
--><small><ul><li>[[Biff]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Biff]]'s birthday</li></ul></small>
|30 = <small><ul><li>[[Felicity]]'s birthday</li></ul></small>
+
|<!--30-->{{#expr:{{#var:firstDayNum}} + 29}} = <small><ul><li>[[Felicity]]'s birthday</li><li>[[Daisy Mae]]'s birthday</li></ul></small>
|31 = {{#switch: {{#var:curYear}} | 2013 | 2024 = <center>'''[[Bunny Day]]'''</center>}}<!--
+
|<!--31-->{{#expr:{{#var:firstDayNum}} + 30}} = {{#switch: {{#var:curYear}} | 2013 | 2024 = <div style="margin: 0 auto; text-align: center;">'''[[Bunny Day]]'''</div>}}<!--
 
--><small><ul><li>[[Klaus]]'s birthday</li></ul></small>
 
--><small><ul><li>[[Klaus]]'s birthday</li></ul></small>
}}<noinclude>
+
}}<noinclude><br>
==Usage==
+
{{Documentation}}
<pre>{{CalFillMarch|year=YEAR}}</pre>
+
[[Category:Calendar templates]]
This template is used to automatically generate and populate a template call for [[Template:Calendar]] for the month of [[March]] for a year <code>YEAR</code>. If no year is provided, the current year will be used.
+
[[Category:Pages using the Variables extension]]
==Coding notes==
 
*The template determines when a non-date specific event (e.g. fourth Thursday in November) occurs by using the following formula for each possible date that event could occur on: <blockquote><code><nowiki>{{#ifeq: {{#time:l|01 January {{#var:curYear}}}} | Tuesday |...}}</nowiki></code></blockquote> In this example, the template is checking to see if the first day of January was a Tuesday, and if so it will insert information about the event (represented by "..." in this example). If an event lasts for more than one day (e.g. [[Bright Nights]]) a #switch function is used instead, <blockquote><code><nowiki>{{#switch: {{#time:l|01 January {{#var:curYear}}}} | Tuesday | Wednesday =...</nowiki></code></blockquote> however the logic is essentially the same. The usage of <code>#ifeq</code> is recommended to facilitate multiple overlapping events.
 
**For days with multiple events (i.e., those with multiple <code>#switch</code> and <code>#ifeq</code> functions), the following hierarchy is recommended. The arrangement of multiple events that occur in the same category (e.g., January's Yay Day and Flea Market, which are both ''events that fall on a non-specific day but on a specific week'') is up to the discretion of the editor; however, as much as possible, they should be arranged from earliest appearance (game) to latest, regionally (international, NA, JP, EU, KO), alphabetically.
 
***Events that fall on a specific day every year (e.g., [[Valentine's Day]] and [[Leap Day]]), excluding birthdays
 
***Events that fall on a specific day on certain years (e.g., [[Festivale]])
 
***Events that fall on a non-specific day but on a specific week (e.g., [[Fishing Tourney]])
 
***Events that span multiple days (e.g., [[Bright Nights]])
 
***Birthdays, non-special to special.
 
**Those who look at the code may be surprised when they see <code><nowiki><!--\n\t--></nowiki></code>. The presence of this quirk is to make the code legible for future maintainers, and so that line breaks will not be recorded (e.g., if the <code>#ifeq</code> statement fails). The reason why <code><nowiki>\n\t</nowiki></code> is not used is because unwanted linebreaks will occur: see [https://www.mediawiki.org/wiki/Topic:Pqwack7wze5mkv2q this page] for more information. For those who will revise the code in the future, they may temporarily replace <code><nowiki><!--\n\t--></nowiki></code> with <code><nowiki>\n\t</nowiki></code> in a text editor, and do the reverse afterwards.
 
**With regards to overlapping events, it is assumed that multiple events will occur on the same day. For example, in 1 April 2018, both [[Bunny Day]] and [[April Fool's Day]] occur on the same day in {{NL|short|nolink}}. Another example is 14 February 2026, when both the [[Fishing Tourney]] and [[Valentine's Day]] occur in {{CF|short|nolink}}. Unless otherwise stated, all events that overlap each other will occur at the same day.<br>
 
*The calculation of certain holidays such as [[Festivale]] and [[Bunny Day]] are particularly difficult, for they depend on the lunisolar calendar. The implementation for these holidays is as follows: determine whether <code><nowiki>{{#var:curYear}}</nowiki></code> matches for some pre-determined date:<blockquote><code><nowiki>|28 = {{#switch: {{#var:curYear}} | 2022 | 2033 = ...</nowiki></code></blockquote>A list, for example, of all dates for Festivale must be known beforehand. This is much easier; however, it means that the template must be updated sometime in the future to show the correct dates for certain holidays in 2050 onward and for future releases.
 
 
</noinclude>
 
</noinclude>

Latest revision as of 12:31, November 1, 2022

← February March 2024 April →
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
25
26
27
28
29
1
2
Weeding Day (NL)
South Korea only
3
Girl's Festival (CF/NL)
Japan only
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Shamrock Day (NL)
USA only Europe only
18
19
Father's Day (CF/NL)
Italy only Spain only
20
Spring Sports Fair (AC)
21
Spring Sports Fair (AC)
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6


Template documentation (view)


Usage

{{CalFillMarch|year=YEAR}}

This template is used to automatically generate and populate a template call for Template:Calendar for the month of March for a year YEAR. If no year is provided, the current year will be used.

Coding notes

  • Two variables are predefined using Extension:Variables, namely curYear, which contains either the current year or a predefined YEAR, and firstDay, which is the first day of the current month for the year curYear.
  • The template determines when a non-date specific event (e.g. fourth Thursday in November) occurs by using the following formula for each possible date that event could occur on:

    {{#ifeq: {{#var:firstDay}} | Tuesday | ...}}

    In this example, the template is checking to see if the first day of the given month is a Tuesday, and if so it will insert information about the event (represented by ... in this example). If an event lasts for more than one day (e.g. Bright Nights) a #switch function is used instead,

    {{#switch: {{#var:firstDay}} | Tuesday | Wednesday =...}}

    and the logic is essentially the same. The usage of #ifeq is recommended to facilitate multiple overlapping events.
  • For days with multiple events (i.e., those with multiple #switch and #ifeq functions), the following hierarchy is recommended.
    • Events that fall on a specific day every year (e.g., Valentine's Day and Leap Day), excluding birthdays
    • Events that fall on a specific day on certain years (e.g., Festivale)
    • Events that fall on a non-specific day but on a specific week (e.g., Fishing Tourney)
    • Events that span multiple days (e.g., Bright Nights)
    • Birthdays, non-special to special, alphabetical.
  • The arrangement of multiple events that occur in the same hierarchy (e.g., January's Yay Day and Flea Market, which are both events that fall on a non-specific day but on a specific week) is up to the discretion of the editor; however, it is recommended that they be arranged in the following order: last appearance (events that have last appeared in later games are arranged first), regionally (all regions, NA, JP, EU, KO), alphabetically.
  • Those who look at the code may be surprised when they see several <!--\n\t-->. The presence of this quirk is to make the code legible for future maintainers, and so that line breaks will not be recorded (e.g., if the #ifeq statement fails). The reason why \n\t is not used is because unwanted linebreaks will occur: see this comment for more information. For those who will revise the code in the future, they may temporarily replace <!--\n\t--> with \n\t using their regex-compatible text editor, and do the reverse afterwards.
  • With regards to overlapping events, it is assumed that multiple events will occur on the same day. For example, in April 1, 2018, both Bunny Day and April Fool's Day occur on the same day in New Leaf. Another example is February 14, 2026, when both the Fishing Tourney and Valentine's Day occur in City Folk. Unless otherwise stated, all events that overlap each other will occur at the same day.
  • The calculation of certain holidays such as Festivale and Bunny Day are particularly difficult, for they depend on the lunisolar calendar. The implementation for these holidays is as follows: determine whether {{#var:curYear}} matches for some pre-determined date:

    |28 = {{#switch: {{#var:curYear}} | 2022 | 2033 = ...

    A list of all dates for Festivale must be known beforehand. This is much easier; however, it means that the template must be updated sometime in the future to show the correct dates for certain holidays.