Custom Corporate Holidays with holidays package

I am currently working on a newish personal project. My plan is to create a Python version of a Google Script app that I am running. I wanted to find a way to determine if a given date is a national holiday. This requires taking into account that National Holidays that fall on a Sunday are moved to the following Monday or to Tuesday if Monday is already a National Holiday. I also needed to support adding Company holidays. This is important as it impacts some calculations. Enter the Python package: holidays

[Read More]

Generic Regex Match Function Multiple Groups

If you have read my previous posts; you might know I am currently working on a new project to move some services to a self-hosted solution. As part of this, I have been working on dealing with unicode characters in regex.

In relation to this I have found that I am writing the same function repeatedly. The only difference being the number matches being returned. So I decided we need to refactor this.

[Read More]