Jump to content

#8: Today I will stay in bed!

Tom Wellige


Days in which you can stay in bed in the morning are usually weekends, vacations or public/bank holidays. 


While you can plan your call routing for weekends and vacations quite easily, as they have fixed/planned dates, things get a little bit more difficult with public/bank holidays. There are of course public/bank holidays with fixed dates, like "Labor day (01.05.)" or "Day of German reunification (03.10.)" or "Christmas (25.12./26.12.)", but there are also "moving" public/bank holidays, the church holidays. These holidays are all tight to Easter, either at a fixed distance before or after it (Good Friday, Pentecost, etc.). Problem is, Easter is every year on a different date. I spare you the history behind this,  lets just accept it as it is.


So, to solve the problem of public/bank/church holidays from a call routing perspective many people (incl. me) came up with simple solutions, all based on prepared lists of such holidays (in text files or databases). My solution to this problem for example is still available in the Swyx Knowledgebase.


All these attempts with prepared lists of public/bank/church holidays all share the same problem: these lists have an end. Regardless for how many years you put these dates in advance into the list, if the final date is reached and you forgot about this list, your call routing will not know about holidays. I saw many cases where this happened, where after a couple of years it was forgotten to maintain the holidays list.


In comes the solution for this problem: calculate the moving church holidays. Do it exactly like it is done in reality. In 1800 Carl Friedrich Gauss published his "Easter algorithm" to calculate the Julian or Gregorian Easter. If you want to learn how this algorithm works, just follow the previous link. 


In 2014 the forum user JoergG glued the Gauss algorithm into VBScript along with a framework to check for any holiday (fixed or moving) in any of the German federal states. And he was very kind to offer this function to the community! In 2018 the forum user kroni99 adapted this function for Austria. Both these functions are of course available here on Swyx Forum:


If you have adapted the "IsPublicHoliday" function for another country it would be quite nice of you if you would share it with the community. Either post it yourself of just get in touch with me.


So, if you need to know in your call routing if today is a public holiday you can directly call this function from within an "Evaluate" block:







The entire usage instructions for the "IsPublicHoliday" function are given in the above stated links to the functions for Austria and Germany. so I will save you from all the details here. 


It can't get any more easy: you setup this call routing (which is not more than a little bit of Copy&Paste, according to the linked instructions) and then you can forget about the public/bank/church holidays again. You don't need to update your call routing anymore in a couple of years.


Of course you shouldn't forget about them if you want to stay in bed a little bit longer ;) 





PS: don't miss to take a look into the ECR Useful Link Collection



Recommended Comments

There are no comments to display.

Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.