Template:CalFillFebruary

Usage
This template is used to automatically generate and populate a template call for Template:Calendar for the month of January for the year specified. 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|text= {{#ifeq: {{#time:l|01 February {{{year|{{LOCALYEAR}}}}}}} | Tuesday |... }} In this example, the template is checking to see if the first day of February 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|text= {{#switch: {{#time:l|01 February {{{year|{{LOCALYEAR}}}}}}} | Tuesday | Wednesday =... }} however the logic is essentially the same.
 * The calculation of Festivale's date is particularly difficult in that it varies based on Easter, which is determined by a lunisolar calendar. Rather than attempt to calculate Easter's date in a given year and from that value calculate Festivale's date (which is 48 days before Easter), I instead researched Festivale's date for the next 11 years and had the template check if  {{{year|{{LOCALYEAR}}}}}  matched for that date:{{blockquote|text= |27 = {{#ifeq: {{{year|{{LOCALYEAR}}}}} | 2017 |... }}This is much easier, however it means that the template must be updated sometime in the future to show the correct dates for Festivale in 2028 onward.