Learn about the Holidays date function and see the list of the available countries.
Holidays function is one of the date functions Plecto has implemented to make working with date and time objects easier. It returns the number of holidays from a list of countries that you can select directly in the formula editor. The number depends on the start and end dates you select in the formula editor and the time period set on the widget.
For example, with Start date: Widget start date, End date: Widget end date and the time period on the widget set to "Current year," you will see the total number of holidays in a given country for this year. If you choose the United States, the number will be 11, but if you select Denmark, the formula will return 8.
How to use the Holidays function in formulas
When building formulas, the Holidays function is often combined with the Workdays function, which counts the number of working days within a set time period. Say you want to create a month-to-date target formula. Adding the Holidays function allows you to exclude the holidays from the day count to only look at the days you are working and display your to-date targets accordingly.
An example of a formula that will return the number of working days. It excludes weekends and Danish public holidays.
- United Kingdom
- United States
- South Africa
- South Korea