> 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/en/hvac-library/functionblocks/clock/publicholiday.md).

# PublicHoliday

## `PublicHoliday` (FB)

FUNCTION\_BLOCK PublicHoliday

### Short description

> Display of the states of public holidays.\
> Typical application: detection of public holidays in a clock system

### Representation

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2Fgit-blob-502ac2044a70038ac72ec937b9ff8442ab6fa09a%2FPublicHoliday_FB.png?alt=media" alt=""><figcaption></figcaption></figure>

### Interfaces

#### Inputs

| Name               | Data type                                  | Value range | Initial value | Function                                                                  |
| ------------------ | ------------------------------------------ | ----------- | ------------- | ------------------------------------------------------------------------- |
| *xEn*              | BOOL                                       |             |               | Enable / disable of the function (FALSE = disabled, TRUE = enabled)       |
| *astPublicHoliday* | ARRAY\[0..29] OF HVACTYPES.stPublicHoliday |             |               | Transfer of the defined public holidays with name, date and enable status |

#### Outputs

| Name      | Data type  | Value range | Initial value | Function                                                               |
| --------- | ---------- | ----------- | ------------- | ---------------------------------------------------------------------- |
| *xActive* | BOOL       |             |               | Display - status - public holidays (FALSE = not active, TRUE = active) |
| *sName*   | STRING(30) |             |               | Name of the active public holiday                                      |

#### Setpoints / Parameters

| Name         | Data type    | Value range                               | Initial value   | Function                                      |
| ------------ | ------------ | ----------------------------------------- | --------------- | --------------------------------------------- |
| **eCountry** | eCountryList | eCountryList.UserDefined, eCountryList.DE | eCountryList.DE | Selection of country-specific public holidays |

### Functional description

#### General

This function block determines whether a public holiday is active and displays the name of the public holiday.\
The function block must be activated via the input *xEn* activated (TRUE = function active).\
The public holidays can be defined via the stPublicHoliday structure. Here, the name, the date of the public holiday and the enable status are specified.\
Public holidays can be defined as a fixed date, with an offset to Easter, or as a weekday before a fixed date.\
The setpoint / parameter **eCountry** allows the selection of the country whose public holidays are to be used. Currently, only the public holidays for Germany are implemented.

### Visualization

#### Representation

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2Fgit-blob-528732e390d265ab9b220f4f4d81e54f33746797%2FPublicHoliday.PNG?alt=media" alt=""><figcaption></figcaption></figure>

#### Interfaces visualization element

| Name                  | Data type     | Type         | Initial value | Function                                                                                                                                                                                                                                                                                                    |
| --------------------- | ------------- | ------------ | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **FB\_PublicHoliday** | PublicHoliday | VAR\_IN\_OUT |               | Enter FB PublicHoliday here, e.g. PRG.PublicHoliday                                                                                                                                                                                                                                                         |
| **BMS\_Active**       | BOOL          | VAR\_INPUT   |               | BMS (Building Management System) GLT (building management technology). If BMS\_Active = TRUE, input / editing of the clocks is disabled, since they can then only be set via the BMS. Time values can then only be viewed.                                                                                  |
| **DisableInput**      | BOOL          | VAR\_INPUT   |               | DisableInpput = TRUE the times of the weekly clocks can only be viewed and not edited./// - BMS (Building Management System) GLT (building management system). If BMS\_Active = TRUE, input/editing of the clocks is disabled because they can then only be set via the BMS. Times can then only be viewed. |

\
Note: VAR\_IN\_OUT interfaces must be assigned; VAR\_INPUT is 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
