setWorkTime dynamic - for easter example


i want to setWorkTime dynamicaly for example for easter holiday which is each year on different day.
Or there are other holidays for example in Germany which are calculated and not fixed.

How to handle these days? Can i some how check each day with a function?
I don’t want to set a fixed non working list.


Hello René,
If you only want to highlight the weekend, you can use a custom function to check if that day should be highlighted.
But if you want to specify the work time - you need to create a list of the weekends. If you use the following function, you can check all calendars:


Each object in the array contains the worktime property that is a list of dates.
However, you can use a function that will check the current day with your calculations and specify that the current day should be added as a non-working day.
Here is an example: