Overview Holiday time clock

This function block implements a holiday time clock. The block can calculate the holidays itself or load them from an ICal file (*.ics) on a server - or use both together. With the calculation the controller needs no internet connection: the fixed holidays are stored per country and federal state or canton, and the moveable holidays such as Easter, Ascension, Whitsun and Corpus Christi are derived from the Easter date.




Inputs

FG
Enable
Optional enable. If nothing is connected at this input, the clock is automatically enabled. Otherwise only when a value of 1 is present at the input.

Outputs

A1-x
Output 1-x
Outputs. The same value is output at all outputs.
FM
Holiday tomorrow
Only present when the parameter "Preview outputs" is switched on. If tomorrow is a holiday, Value on is output, otherwise Value off. This allows a heating system to be adjusted on the previous day, for example.
TG
Days until the next holiday
Only present when the parameter "Preview outputs" is switched on. Number of days until the next holiday. 0 means that today is a holiday, 1 means tomorrow. If no holiday follows within the next months, or if the clock is not enabled, -1 is output.

Parameters

Source
Where the holidays come from:
  • Calculation: The holidays are calculated from the country and the federal state or canton. Nothing is loaded from the internet.
  • iCal file: The holidays come from the file given under "URL ICal file", as before.
  • Calculation + iCal: Both sources apply together. This allows the calculated holidays to be supplemented with your own dates, for example company holidays, school holidays or municipal holidays that do not follow a rule.
In projects created with an older version the source is set to "iCal file" - nothing changes there. Newly created blocks start with "Calculation".
Country
Austria, Germany, Switzerland or Italy. Only visible with the calculation.
Federal state / canton
Determines the regional holidays. With "Nationwide" only the days celebrated throughout the whole country apply. Only visible with the calculation.

Note: When the country is changed, the federal state and the selection are reset, because they no longer match the new country.
Holidays
The "..." button opens the holiday selection. Every day can be selected or cleared individually there, including additional days such as 24 and 31 December. For every day the calculated date for this and the next year is shown, together with the kind of day:
  • statutory: public holiday throughout the whole country.
  • statutory, regional: public holiday in the selected region.
  • partly (municipal): applies only in individual municipalities of the region. These days are not preselected and have to be checked locally.
  • school/state holiday: not a public holiday under the working time act, but schools and public offices stay closed. Not preselected.
  • additional day: not a holiday, can be selected in addition if required. Not preselected.
If nothing is changed, all statutory holidays of the selected region apply. Only visible with the calculation.
Number of outputs
Number of outputs.
Value on/off
When the switching time is reached, Value on is output at the outputs, otherwise Value off.
URL ICal file URL from which the ics file is loaded. The file is automatically loaded once per day from this server. These can, for example, be loaded from Internet sites that provide ICal files (e.g. https://www.ferienwiki.at) and provided on your own server.

The following calendar sources are supported:
  • Google Calendar: Open Google Calendar in a browser on a computer (not in the mobile app), click the gear icon > "Settings" in the top right, then click the desired calendar on the left under "Settings for my calendars". In the section "Integrate calendar", copy the "Public address in iCal format" or "Secret address in iCal format" and paste it here.
  • Apple iCloud Calendar: Share the calendar publicly and paste the share link (starts with webcal://...). How to get there depends on the device:
    • iPhone/iPad: Open the Calendar app, tap "Calendars" at the bottom, then tap the info icon (i) next to the desired iCloud calendar. Enable the "Public Calendar" option, tap "Share Link" and copy the link (e.g. via "Copy" or by sending it to yourself).
    • Mac: In the Calendar app, right-click the calendar in the sidebar and choose "Share Calendar ..." (or click the icon next to the calendar name). Check "Public Calendar", then right-click the calendar and choose "Copy URL".
    • iCloud.com in the browser: Open Calendar, click the share icon next to the calendar in the sidebar, enable "Public Calendar" and copy the displayed link.
    Notes: Only iCloud calendars can be shared publicly (not Google or Exchange calendars added to the Apple Calendar app). Anyone who knows the link can read the events of this calendar - it is therefore best to create a separate calendar just for the switching times. The webcal:// link can be pasted as it is.
  • Google Drive: Store an ics file in Google Drive, share it with "Anyone with the link" and paste the share link.
  • Dropbox: Store an ics file in Dropbox and paste the share link.
  • Any http/https/webcal address that directly delivers an ics file.
Share links are automatically converted into download addresses. The file must start with BEGIN:VCALENDAR. Events with yearly recurrence are supported, other recurrence rules (e.g. weekly) are not. For events with a time of day, the whole day counts. If the server cannot be reached or delivers an invalid response, the last loaded file is kept.

The files can contain holidays for several years. In addition, the URL can contain a placeholder for the year (%YYYY), which is replaced by the current year when loading. This allows several years to be provided in advance on your own server.

Ready-made holiday calendars from Google:
Google provides public holiday calendars for most countries. The address can be pasted directly, e.g.:
  • Austria: https://calendar.google.com/calendar/ical/de.austrian%23holiday%40group.v.calendar.google.com/public/basic.ics
  • Germany: https://calendar.google.com/calendar/ical/de.german%23holiday%40group.v.calendar.google.com/public/basic.ics
  • Switzerland: https://calendar.google.com/calendar/ical/de.ch%23holiday%40group.v.calendar.google.com/public/basic.ics
  • Italy: https://calendar.google.com/calendar/ical/it.italian%23holiday%40group.v.calendar.google.com/public/basic.ics
  • South Tyrol (Italian holidays in German language): https://calendar.google.com/calendar/ical/de.italian%23holiday%40group.v.calendar.google.com/public/basic.ics
Alternatively via the Google Calendar interface: In a browser on a computer, click the plus sign next to "Other calendars" at the bottom left, choose "Browse calendars of interest" and subscribe to the desired country under "Regional holidays". Then click the holiday calendar in the settings and copy the "Public address in iCal format" under "Integrate calendar".

Ready-made holiday calendars from Apple:
Apple also provides the holiday calendars known from iPhone/Mac publicly (the built-in "Holidays" calendar on the device itself cannot be shared, but the underlying addresses can be accessed directly), e.g.:
  • Austria: webcal://calendars.icloud.com/holidays/at_de.ics
  • Germany: webcal://calendars.icloud.com/holidays/de_de.ics
  • Switzerland: webcal://calendars.icloud.com/holidays/ch_de.ics
  • Italy: webcal://calendars.icloud.com/holidays/it_it.ics (Italian language only; for South Tyrol in German use the Google calendar above)
The address pattern is webcal://calendars.icloud.com/holidays/<country>_<language>.ics (e.g. fr_fr, es_es, us_en). Not available for all countries.

Address generator:
Here the calendar address can be put together for all EU countries and Switzerland. Select country and state/region, then copy the desired address and paste it into the "URL ICal file" parameter:

Country:
State/region:
Google:
Apple:

Important: This address generator cannot take future changes of the calendar addresses by Google and Apple into account. If a generated address does not work, please refer to the current documentation of the respective provider (Google Calendar Help or Apple Support).

Note: The holiday calendars from Google and Apple partly also contain observances that are not public holidays (e.g. Valentine's Day, Mother's Day). If you only want to switch on legal public holidays, it is best to create your own calendar (see above) and enter the desired days yourself - with yearly recurrence this only has to be done once.


Preview outputs
Switches on the two additional outputs "Holiday tomorrow" (FM) and "Days until the next holiday" (TG).

Note: The two outputs are appended after the normal outputs. If the parameter is switched off again, the addresses entered there are lost. If only the number of outputs is changed, the addresses move along automatically.

The outputs are supported from controller version 2.3137 onwards.



Calculated holidays

Moveable holidays are derived from the Easter date: Good Friday two days before, Easter Monday one day after, Ascension 39 days, Whit Sunday 49 days, Whit Monday 50 days and Corpus Christi 60 days after Easter Sunday. The German Day of Repentance and Prayer is the Wednesday before 23 November, the Swiss Federal Day of Thanksgiving is the third Sunday in September.

Austria
Statutory nationwide: New Year, Epiphany, Easter Monday, National Day (1 May), Ascension, Whit Monday, Corpus Christi, Assumption, National Holiday (26 October), All Saints, Immaculate Conception, Christmas Day and St Stephen's Day.
Good Friday has not been a public holiday since 2019; it was replaced by the personal holiday. It is therefore only available as an additional day.
The patron saints (St Joseph, St Florian, St Rupert, St Martin, St Leopold) and the Carinthian Plebiscite Day are not public holidays under the working time act, but school and state holidays.

Germany
Statutory nationwide: New Year, Good Friday, Easter Monday, Labour Day, Ascension, Whit Monday, German Unity Day, Christmas Day and Boxing Day.
Epiphany, International Women's Day, Corpus Christi, Assumption, World Children's Day, Reformation Day, All Saints and the Day of Repentance and Prayer apply regionally. In Brandenburg Easter Sunday and Whit Sunday are public holidays as well.
Corpus Christi in Saxony and Thuringia, Assumption in Bavaria and the Augsburg Peace Festival apply only in individual municipalities and are therefore not preselected.
The Berlin Liberation Day on 8 May is not stored, because so far it only applied on single occasions. It can be added through the source "Calculation + iCal".

Switzerland
Only the National Day on 1 August is regulated by federal law; everything else is defined by the cantons and in part even by the municipalities. The table reflects common practice.
Geneva is the only canton without the Federal Day of Thanksgiving; instead it has the Jeune genevois on the Thursday after the first Sunday in September. Vaud additionally has the Monday after the Federal Day of Thanksgiving. Valais and Ticino differ regarding Good Friday, Easter Monday and Whit Monday. In Aargau, Fribourg, Grisons and Solothurn many days are free of work only in individual municipalities; they are shown as "partly" and are not preselected.

Italy
Statutory nationwide: New Year, Epiphany, Easter Sunday, Easter Monday, Liberation Day, Labour Day, Republic Day, Assumption, All Saints, Immaculate Conception, Christmas Day and St Stephen's Day.
Good Friday, Ascension and Corpus Christi are not holidays in Italy. Whit Monday is a day off only in the Autonomous Province of Bolzano (South Tyrol) - select "South Tyrol" as the region there.
The patron saint's day is a day off in the individual municipality. The most important city patrons are stored as "partly" and can be ticked if required; all others can be added through the source "Calculation + iCal".

The applicable law always takes precedence. The stored rules reflect the situation at the time of delivery - if the legislator changes a holiday, the selection has to be adjusted or the source "Calculation + iCal" has to be used.





See also common parameters of all function blocks.