Difference between revisions of "Template:CalFillApril"

From Nookipedia, the Animal Crossing wiki
(Rewriting. Sorry it got a bit late. Reference for Flower Fest: https://www.youtube.com/watch?v=897pb8dMO-8; Easter: http://tlarsen2.tripod.com/thomaslarsen/easterdates.html. If there is any mistake regarding Flower Fest or Bunny Day, edit immediately.)
Line 1: Line 1:
 +
{{#vardefine:curYear|{{{year|{{LOCALYEAR}}}}}}}
 +
{{#vardefine:firstDay|{{#time:l|01 April {{#var:curYear}}}}}}
 
{{Calendar
 
{{Calendar
|year = {{{year|{{LOCALYEAR}}}}}
+
|year = {{#var:curYear}}
 
|month = April
 
|month = April
|01 = <center>'''[[April Fool's Day]]'''</center>{{#ifeq: {{{year|{{LOCALYEAR}}}}} | 2018 | <center>'''[[Bunny Day]]'''<small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</center>}}<small><ul><li>[[Tammi]]'s birthday</li></ul></small>
+
|01 = <center>'''[[April Fool's Day]]'''</center><!--
|02 = <small><ul><li>[[Cashmere]]'s birthday</li></ul></small>
+
-->{{#switch: {{#var:curYear}} | 2018 | 2029 | 2040 = <center>'''[[Bunny Day]]'''</center>}}<!--
|03 = <small><ul><li>[[Eunice]]'s birthday</li></ul></small>
+
-->{{#ifeq: {{#var:firstDay}} | Saturday | <center>'''[[Flea Market]]''' <small>({{WW|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}<!--
|04 = {{#ifeq: {{{year|{{LOCALYEAR}}}}} | 2021 | <center>'''[[Bunny Day]]'''<small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</center>}} <small><ul><li>[[Buck]]'s birthday</li></ul></small>
+
--><small><ul><li>[[Tammi]]'s birthday</li></ul></small>
|05 = {{#ifeq: {{{year|{{LOCALYEAR}}}}} | 2026 | <center>'''[[Bunny Day]]'''<small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</center>}} <center>'''[[Cherry Blossom Festival]]'''</center><small><ul><li>[[Beau]]'s birthday</li></ul></small>
+
|02 = {{#ifeq: {{#var:firstDay}} | Friday | <center>'''[[Flea Market]]''' <small>({{WW|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}<!--
|06 = <center>'''[[Cherry Blossom Festival]]'''</center><small><ul><li>[[Hopper]]'s birthday</li><li>[[Mr. Resetti]]'s birthday</li></ul></small>
+
--><small><ul><li>[[Cashmere]]'s birthday</li></ul></small>
|07 = <center>'''[[Cherry Blossom Festival]]'''</center><small><ul><li>[[Rasher]]'s birthday</li></ul></small>
+
|03 = {{#ifeq: {{#var:firstDay}} | Thursday | <center>'''[[Flea Market]]''' <small>({{WW|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}<!--
|08 = {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Saturday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</center>}} {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Monday | <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</center>}} <small><ul><li>[[Maelle]]'s birthday</li></ul></small>
+
-->{{#switch: {{#var:firstDay}} | Saturday = <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
|09 = {{#ifeq: {{{year|{{LOCALYEAR}}}}} | 2023 | <center>'''[[Bunny Day]]'''<small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</center>}} {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Friday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</center>}} {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Sunday | <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</center>}} <small><ul><li>[[Stella]]'s birthday</li></ul></small>
+
--><small><ul><li>[[Eunice]]'s birthday</li></ul></small>
|10 = {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Thursday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</center>}} {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Saturday | <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</center>}} <small><ul><li>[[Shari]]'s birthday</li></ul></small>
+
|04 = {{#switch: {{#var:curYear}} | 2010 | 2021 = <center>'''[[Bunny Day]]'''</center>}}<!--
|11 = {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Wednesday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</center>}} {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Friday | <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</center>}} <small><ul><li>[[Punchy]]'s birthday</li></ul></small>
+
-->{{#ifeq: {{#var:firstDay}} | Wednesday | <center>'''[[Flea Market]]''' <small>({{WW|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}<!--
|12 = {{#ifeq: {{{year|{{LOCALYEAR}}}}} | 2020 | <center>'''[[Bunny Day]]'''<small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</center>}} {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Tuesday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</center>}} {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Thursday | <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</center>}} <small><ul><li>[[Melba]]'s birthday</li></ul></small>
+
-->{{#switch: {{#var:firstDay}} | Friday | Saturday = <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
|13 = {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Monday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</center>}} {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Wednesday | <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</center>}} <small><ul><li>[[Candi]]'s birthday</li></ul></small>
+
--><small><ul><li>[[Buck]]'s birthday</li></ul></small>
|14 = {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Sunday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</center>}} {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Tuesday | <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</center>}} <small><ul><li>[[Rocket]]'s birthday</li></ul></small>
+
|05 = <center>'''[[Cherry Blossom Festival]]''' <small>({{PG|shortest|nolink}})</small></center><!--
|15 = <small><ul><li>[[Grams]]'s birthday</li></ul></small>
+
-->{{#switch: {{#var:curYear}} | 2015 | 2026 | 2037 | 2048 = <center>'''[[Bunny Day]]'''</center>}}<!--
|16 = {{#ifeq: {{{year|{{LOCALYEAR}}}}} | 2028 | <center>'''[[Bunny Day]]'''<small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</center>}} <small><ul><li>[[Vesta]]'s birthday</li></ul></small>
+
-->{{#ifeq: {{#var:firstDay}} | Tuesday | <center>'''[[Flea Market]]''' <small>({{WW|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}<!--
|17 = {{#ifeq: {{{year|{{LOCALYEAR}}}}} | 2022 | <center>'''[[Bunny Day]]'''<small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</center>}} <small><ul><li>[[Charlise]]'s birthday</li><li>[[Porter]]'s birthday</li></ul></small>
+
-->{{#switch: {{#var:firstDay}} | Thursday | Friday | Saturday = <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
|18 = <small><ul><li>[[Piper]]'s birthday</li></ul></small>
+
--><small><ul><li>[[Beau]]'s birthday</li></ul></small>
 +
|06 = <center>'''[[Cherry Blossom Festival]]''' <small>({{PG|shortest|nolink}})</small></center><!--
 +
-->{{#switch: {{#var:curYear}} | 2042 = <center>'''[[Bunny Day]]'''</center>}}<!--
 +
-->{{#ifeq: {{#var:firstDay}} | Monday | <center>'''[[Flea Market]]''' <small>({{WW|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}<!--
 +
-->{{#switch: {{#var:firstDay}} | Wednesday | Thursday | Friday | Saturday = <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
 +
--><small><ul><li>[[Hopper]]'s birthday</li><li>[[Mr. Resetti]]'s birthday</li></ul></small>
 +
|07 = <center>'''[[Cherry Blossom Festival]]''' <small>({{PG|shortest|nolink}})</small></center><!--
 +
-->{{#ifeq: {{#var:firstDay}} | Sunday | <center>'''[[Flea Market]]''' <small>({{WW|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}<!--
 +
-->{{#switch: {{#var:firstDay}} | Tuesday | Wednesday | Thursday | Friday | Saturday = <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
 +
--><small><ul><li>[[Rasher]]'s birthday</li></ul></small>
 +
|08 = {{#switch: {{#var:curYear}} | 2012 = <center>'''[[Bunny Day]]'''</center>}}<!--
 +
-->{{#ifeq: {{#var:firstDay}} | Saturday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}<!--
 +
-->{{#switch: {{#var:firstDay}} | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday = <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
 +
--><small><ul><li>[[Maelle]]'s birthday</li></ul></small>
 +
|09 = {{#switch: {{#var:curYear}} | 2023 | 2034 | 2045 = <center>'''[[Bunny Day]]'''}}<!--
 +
-->{{#ifeq: {{#var:firstDay}} | Friday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}<!--
 +
--><center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</small></center><!--
 +
--><small><ul><li>[[Stella]]'s birthday</li></ul></small>
 +
|10 = {{#switch: {{#var:curYear}} | 2039 | 2050 = <center>'''[[Bunny Day]]'''</center>}}<!--
 +
-->{{#ifeq: {{#var:firstDay}} | Thursday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}<!--
 +
-->{{#switch: {{#var:firstDay}} | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday = <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
 +
--><small><ul><li>[[Shari]]'s birthday</li></ul></small>
 +
|11 = {{#ifeq: {{#var:firstDay}} | Wednesday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}}<!--
 +
-->{{#switch: {{#var:firstDay}} | Sunday | Monday | Tuesday | Wednesday | Thursday = <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
 +
--><small><ul><li>[[Punchy]]'s birthday</li></ul></small>
 +
|12 = {{#switch: {{#var:curYear}} | 2009 | 2020 = <center>'''[[Bunny Day]]'''}}<!--
 +
-->{{#ifeq: {{#var:firstDay}} | Tuesday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}} <!--
 +
-->{{#switch: {{#var:firstDay}} | Sunday | Monday | Tuesday | Wednesday = <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
 +
--><small><ul><li>[[Melba]]'s birthday</li></ul></small>
 +
|13 = {{#switch: {{#var:curYear}} | 2031 | 2036 = <center>'''[[Bunny Day]]'''</center>}}<!--
 +
-->{{#ifeq: {{#var:firstDay}} | Monday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></center>}} <!--
 +
-->{{#switch: {{#var:firstDay}} | Sunday | Monday | Tuesday = <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
 +
--><small><ul><li>[[Candi]]'s birthday</li></ul></small>
 +
|14 = {{#switch: {{#var:curYear}} | 2047 = <center>'''[[Bunny Day]]'''</center>}}<!--
 +
-->{{#ifeq: {{#var:firstDay}} | Sunday | <center>'''[[Fishing Tourney]]''' <small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</center>}}<!--
 +
-->{{#switch: {{#var:firstDay}} | Sunday | Monday = <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
 +
--><small><ul><li>[[Rocket]]'s birthday</li></ul></small>
 +
|15 = {{#switch: {{#var:firstDay}} | Sunday = <center>'''[[Flower Fest]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
 +
--><small><ul><li>[[Grams]]'s birthday</li></ul></small>
 +
|16 = {{#switch: {{#var:curYear}} | 2017 | 2028 = <center>'''[[Bunny Day]]'''</center>}}<!--
 +
--><small><ul><li>[[Vesta]]'s birthday</li></ul></small>
 +
|17 = {{#switch: {{#var:curYear}} | 2022 | 2033 | 2044 = <center>'''[[Bunny Day]]'''</center>}}<!--
 +
--><small><ul><li>[[Charlise]]'s birthday</li><li>[[Porter]]'s birthday</li></ul></small>
 +
|18 = {{#switch: {{#var:curYear}} | 2049 = <center>'''[[Bunny Day]]'''</center>}}<!--
 +
--><small><ul><li>[[Piper]]'s birthday</li></ul></small>
 
|19 = <small><ul><li>[[Pietro]]'s birthday</li></ul></small>
 
|19 = <small><ul><li>[[Pietro]]'s birthday</li></ul></small>
|20 = {{#ifeq: {{{year|{{LOCALYEAR}}}}} | 2025 | <center>'''[[Bunny Day]]'''<small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</center>}} <small><ul><li>[[Stu]]'s birthday</li></ul></small>
+
|20 = {{#switch: {{#var:curYear}} | 2014 | 2025 = <center>'''[[Bunny Day]]'''</center>}}<!--
|21 = {{#ifeq: {{{year|{{LOCALYEAR}}}}} | 2019 | <center>'''[[Bunny Day]]'''<small>({{CF|shortest|nolink}}/{{NL|shortest|nolink}})</center>}} <small><ul><li>[[Agnes]]'s birthday</li></ul></small>
+
--><small><ul><li>[[Stu]]'s birthday</li></ul></small>
|22 = {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Sunday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</center>}} <center>'''[[Nature Day]]'''</center> <small><ul><li>[[Phoebe]]'s birthday</li></ul></small>
+
|21 = {{#switch: {{#var:curYear}} | 2019 | 2030 | 2041 = <center>'''[[Bunny Day]]'''</center>}}<!--
|23 = {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Saturday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</center>}} {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Thursday | <center>'''[[Weeding Day]]''' <small>({{NL|shortest|nolink}})</center>}} <small><ul><li>[[Miranda]]'s birthday</li><li>[[Booker]]'s birthday</li></ul></small>
+
--><small><ul><li>[[Agnes]]'s birthday</li></ul></small>
|24 = {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Friday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</center>}} {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Wednesday | <center>'''[[Weeding Day]]''' <small>({{NL|shortest|nolink}})</center>}} <small><ul><li>[[Walt]]'s birthday</li></ul></small>
+
|22 = <center>'''[[Nature Day]]''' <small>({{PG|shortest|nolink}}/{{CF|shortest|nolink}}/{{NL|shortest|nolink}})</small></center><!--
|25 = {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Thursday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</center>}} {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Tuesday | <center>'''[[Weeding Day]]''' <small>({{NL|shortest|nolink}})</center>}} <small><ul><li>[[Bertha]]'s birthday</li></ul></small>
+
-->{{#ifeq: {{#var:firstDay}} | Sunday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
|26 = {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Wednesday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</center>}} {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Monday | <center>'''[[Weeding Day]]''' <small>({{NL|shortest|nolink}})</center>}} <small><ul><li>[[Kevin]]'s birthday</li></ul></small>
+
--><small><ul><li>[[Phoebe]]'s birthday</li></ul></small>
|27 = {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Tuesday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</center>}} {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Sunday | <center>'''[[Weeding Day]]''' <small>({{NL|shortest|nolink}})</center>}} <small><ul><li>[[Katt]]'s birthday</li></ul></small>
+
|23 = {{#ifeq: {{#var:firstDay}} | Saturday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
|28 = {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Monday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</center>}} {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Saturday | <center>'''[[Weeding Day]]''' <small>({{NL|shortest|nolink}})</center>}} <small><ul><li>[[Ava]]'s birthday</li></ul></small>
+
--><small><ul><li>[[Miranda]]'s birthday</li><li>[[Booker]]'s birthday</li></ul></small>
|29 = {{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Friday | <center>'''[[Weeding Day]]''' <small>({{NL|shortest|nolink}})</center>}} <small><ul><li>[[Coach]]'s birthday</li></ul></small>
+
|24 = {{#switch: {{#var:curYear}} | 2011 = <center>'''[[Bunny Day]]'''</center>}}<!--
|30 = <small><ul><li>[[Angus]]' birthday</li></ul></small>{{#ifeq: {{#time:l|01 April {{{year|{{LOCALYEAR}}}}}}} | Friday | <center>'''[[Yay Day]]''' <small>({{WW|shortest|nolink}})</small><br> '''[[Flea Market]]''' <small>({{CF|shortest|nolink}})</small></center> <small><ul>|<small><ul>}}
+
-->{{#ifeq: {{#var:firstDay}} | Friday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
 +
-->{{#ifeq: {{#var:firstDay}} | Wednesday | <center>'''[[Weeding Day]]''' <small>({{NL|shortest|nolink}}){{NA}}</small></center>}}<!--
 +
--><small><ul><li>[[Walt]]'s birthday</li></ul></small>
 +
|25 = {{#switch: {{#var:curYear}} | 2038 = <center>'''[[Bunny Day]]'''</center>}}<!--
 +
-->{{#ifeq: {{#var:firstDay}} | Thursday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
 +
-->{{#ifeq: {{#var:firstDay}} | Tuesday | <center>'''[[Weeding Day]]''' <small>({{NL|shortest|nolink}}){{NA}}</small></center>}}<!--
 +
--><small><ul><li>[[Bertha]]'s birthday</li></ul></small>
 +
|26 = {{#ifeq: {{#var:firstDay}} | Wednesday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
 +
-->{{#ifeq: {{#var:firstDay}} | Monday | <center>'''[[Weeding Day]]''' <small>({{NL|shortest|nolink}}){{NA}}</small></center>}}<!--
 +
--><small><ul><li>[[Kevin]]'s birthday</li></ul></small>
 +
|27 = {{#ifeq: {{#var:firstDay}} | Tuesday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
 +
-->{{#ifeq: {{#var:firstDay}} | Sunday | <center>'''[[Weeding Day]]''' <small>({{NL|shortest|nolink}}){{NA}}</small></center>}}<!--
 +
--><small><ul><li>[[Katt]]'s birthday</li></ul></small>
 +
|28 = {{#ifeq: {{#var:firstDay}} | Monday | <center>'''[[Fishing Tourney]]''' <small>({{WW|shortest|nolink}})</small></center>}}<!--
 +
-->{{#ifeq: {{#var:firstDay}} | Saturday | <center>'''[[Weeding Day]]''' <small>({{NL|shortest|nolink}}){{NA}}</small></center>}}<!--
 +
--><small><ul><li>[[Ava]]'s birthday</li></ul></small>
 +
|29 = {{#ifeq: {{#var:firstDay}} | Friday | <center>'''[[Weeding Day]]''' <small>({{NL|shortest|nolink}}){{NA}}</small></center>}}<!--
 +
--><small><ul><li>[[Coach]]'s birthday</li></ul></small>
 +
|30 = {{#ifeq: {{#var:firstDay}} | Thursday | <center>'''[[Weeding Day]]''' <small>({{NL|shortest|nolink}}){{NA}}</small></center>}}<!--
 +
--><small><ul><li>[[Angus]]' birthday</li></ul></small>
 
}}<noinclude>
 
}}<noinclude>
 
==Usage==
 
==Usage==
This template is used to automatically generate and populate a template call for [[Template:Calendar]] for the month of [[April]] for the year specified. If no year is provided, the current year will be used.
+
<blockquote><tt><nowiki>{{CalFillApril|year=YEAR}}</nowiki></tt></blockquote>
 +
This template is used to automatically generate and populate a template call for [[Template:Calendar]] for the month of [[April]] for a year <tt>YEAR</tt>. If no year is provided, the current year will be used.
 +
==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><tt><nowiki>{{#ifeq: {{#time:l|01 January {{{year|{{LOCALYEAR}}}}}}} | Tuesday |...}}</nowiki></tt></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><tt><nowiki>{{#switch: {{#time:l|01 January {{{year|{{LOCALYEAR}}}}}}} | Tuesday | Wednesday =...</nowiki></tt></blockquote> however the logic is essentially the same. The usage of <tt>#ifeq</tt> is recommended to facilitate multiple overlapping events.
 +
**For days with multiple events (i.e., those with multiple <tt>#switch</tt> and <tt>#ifeq</tt> 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 <tt><nowiki><!--\n\t--></nowiki></tt>. 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 <tt>#ifeq</tt> statement fails). The reason why <tt><nowiki>\n\t</nowiki></tt> 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 <tt><nowiki><!--\n\t--></nowiki></tt> with <tt><nowiki>\n\t</nowiki></tt> 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 <tt><nowiki>{{#var:curYear}}</nowiki></tt> matches for some pre-determined date:<blockquote><tt><nowiki>|28 = {{#switch: {{#var:curYear}} | 2022 | 2033 = ...</nowiki></tt></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>

Revision as of 10:08, April 4, 2019


← March April 2024 May →
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
31
1
April Fool's Day
2
3
4
5
Cherry Blossom Festival (AC)
6
Cherry Blossom Festival (AC)
Flea Market (WW/NL)
7
Cherry Blossom Festival (AC)
8
Flower Fest (WW)
9
Flower Fest (WW)
10
Flower Fest (WW)
11
Flower Fest (WW)
12
Flower Fest (WW)
13
Fishing Tourney (CF/NL)
Flower Fest (WW)
14
Flower Fest (WW)
15
16
17
18
19
20
21
22
Nature Day (AC/CF/NL)
23
24
25
26
Weeding Day (NL)Template:NA
27
28
Fishing Tourney (WW)
29
30
1
2
3
4

Usage

{{CalFillApril|year=YEAR}}

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

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:

    {{#ifeq: {{#time:l|01 January {{{year|{{LOCALYEAR}}}}}}} | Tuesday |...}}

    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,

    {{#switch: {{#time:l|01 January {{{year|{{LOCALYEAR}}}}}}} | Tuesday | Wednesday =...

    however 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. 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 <!--\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 page for more information. For those who will revise the code in the future, they may temporarily replace <!--\n\t--> with \n\t 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 New Leaf. Another example is 14 February 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, 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.