Hello @markyodoai
First, you need to define your holiday year and country. Every country has differences on it. Important is we should need to find a list of holiday dates.
Just search on any search engine about it. There are lots of specific public or paid APIs available. One example I’ve found is Public Holiday Api - Nager.Date, check if it fits on your list.
After selecting the API for a list of dates then it will be easy.
There are 2 ways.
- Using Iterator
- Using
map()
function.
Iterator
→ Get the list of dates using the HTTP module
→ Aggregate it using Array Aggregator(if needed)
→ Iterate it using the Iterator module.
→ Use the router module to check and separate the is_holiday or not_holiday using filters.
→ Just for testing purposes add a set variable module in every route, and set value accordingly.
map()
function
This is the simplest version but is hard to understand if you don’t know the get()
and map()
functions.
→ Get the list of dates using the HTTP module
→ Then use a set of multiple variable modules to easily identify whether today is a holiday or not.
The formula for setting multiple variables
{{contains(map(1.data; "date"); formatDate(now; "YYYY-MM-DD"))}}
is_holiday
returns true
OR false
P.S.: Always search first, Check Make Academy. If this is helpful, Mark Best Answers as Solutions
and give
If you need expert help or have questions? Contact or comment below!