> For the complete documentation index, see [llms.txt](https://support.powerio.com/hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.powerio.com/hub/codesys-hvac/hvac-library/functionblocks/clock/publicholiday.md).

# PublicHoliday

## `PublicHoliday` (FB)

FUNCTION\_BLOCK PublicHoliday

### Kurzbeschreibung

> Anzeige der Zustände von Feiertagen.\
> Typische Anwendung: Erkennung von Feiertagen in einem Uhrsystem

### Darstellung

<figure><img src="/files/YYSOEkwo5484wNJSEpWl" alt=""><figcaption></figcaption></figure>

### Schnittstellen

#### Eingänge

| Name               | Datentyp                                   | Wertebereich | Initialwert | Funktion                                                              |
| ------------------ | ------------------------------------------ | ------------ | ----------- | --------------------------------------------------------------------- |
| *xEn*              | BOOL                                       |              |             | Freigabe / Sperrung der Funktion (FALSE = Sperrung, TRUE = Freigabe)  |
| *astPublicHoliday* | ARRAY\[0..29] OF HVACTYPES.stPublicHoliday |              |             | Übergabe der definierten Feiertage mit Name, Datum und Freigabestatus |

#### Ausgänge

| Name      | Datentyp   | Wertebereich | Initialwert | Funktion                                                         |
| --------- | ---------- | ------------ | ----------- | ---------------------------------------------------------------- |
| *xActive* | BOOL       |              |             | Anzeige - Status - Feiertage (FALSE = nicht aktiv, TRUE = aktiv) |
| *sName*   | STRING(30) |              |             | Name des aktiven Feiertags                                       |

#### Sollwerte / Parameter

| Name         | Datentyp     | Wertebereich                              | Initialwert     | Funktion                                 |
| ------------ | ------------ | ----------------------------------------- | --------------- | ---------------------------------------- |
| **eCountry** | eCountryList | eCountryList.UserDefined, eCountryList.DE | eCountryList.DE | Auswahl der länderspezifischen Feiertage |

### Funktionsbeschreibung

#### Allgemeines

Dieser Funktionsbaustein ermittelt, ob ein Feiertag aktiv ist und zeigt zu dem Feiertag den Namen an.\
Der Funktionsbaustein muss über den Eingang *xEn* aktiviert werden (TRUE = Funktion aktiv).\
Die Feiertage können über die Struktur stPublicHoliday definiert werden. Hier wird der Name, das Datum des Feiertags und der Freigabestatus festgelegt.\
Dabei können Feiertage als festes Datum, mit einem Abstand zu Ostern oder Wochentag vor einem festen Datum defniert werden.\
Der Sollwert / Parameter **eCountry** erlaubt die Festlegung des Landes, dessen Feiertage verwendet werden sollen. Aktuell sind nur die Feiertage für Deutschland implementiert.

### Visualisierung

#### Darstellung

<figure><img src="/files/WwF24Jdj1kCxu0cee6dw" alt=""><figcaption></figcaption></figure>

#### Schnittstellen Visu-Element

| Name                  | Datentyp      | Typ          | Initialwert | Funktion                                                                                                                                                                                                                                                                                                                                               |
| --------------------- | ------------- | ------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **FB\_PublicHoliday** | PublicHoliday | VAR\_IN\_OUT |             | Hier FB PublicHoliday eintragen Bsp. PRG.PublicHoliday                                                                                                                                                                                                                                                                                                 |
| **BMS\_Active**       | BOOL          | VAR\_INPUT   |             | BMS (Building Management System) GLT (Gebäudeleittechnik). Wenn BMS\_Active = TRUE wird die Eingabe / Editierung der Uhren deaktiviert da diese dann nur über das BMS eingestellt werden können. Uhrzeiten können dann nur angeschaut werden.                                                                                                          |
| **DisableInput**      | BOOL          | VAR\_INPUT   |             | DisableInpput = TRUE Uhrzeiten der Wochenuhren können nur angesehen werden und nicht editiert werden./// - BMS (Building Management System) GLT (Gebäudeleittechnik). Wenn BMS\_Active = TRUE wird die Eingabe/Editierung der Uhren deaktiviert da diese dann nur über das BMS eingestellt werden können. Uhrzeiten können dann nur angeschaut werden. |

\
Hinweis: VAR\_IN\_OUT Schnittstellen müssen belegt werden, VAR\_INPUT sind optional.

### CODESYS

InOut:

| Scope       | Name               | Type                                        | Initial                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ----------- | ------------------ | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Input       | `xEn`              | `BOOL`                                      | TRUE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Input       | `astPublicHoliday` | <p>ARRAY \[0..29] OF<br>stPublicHoliday</p> | \[STRUCT(sName := ‘00’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘01’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘02’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘03’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘04’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘05’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘06’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘07’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘08’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘09’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘10’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘11’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘12’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘13’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘14’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘15’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘16’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘17’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘18’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘19’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘20’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘21’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘22’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘23’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘24’, datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := ‘Public Holiday 1’, datDate := DATE#2022-1-1, xEnable := TRUE), STRUCT(sName := ‘Public Holiday 2’, datDate := DATE#2022-1-1, xEnable := TRUE), STRUCT(sName := ‘Public Holiday 3’, datDate := DATE#2022-1-1, xEnable := TRUE), STRUCT(sName := ‘Public Holiday 4’, datDate := DATE#2022-1-1, xEnable := TRUE), STRUCT(sName := ‘Public Holiday 5’, datDate := DATE#2022-1-1, xEnable := TRUE)] |
| Input Const | `eCountry`         | eCountryList                                | eCountryList.DE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Output      | `xActive`          | `BOOL`                                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Output      | `sName`            | `STRING(30)`                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://support.powerio.com/hub/codesys-hvac/hvac-library/functionblocks/clock/publicholiday.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
