Neither the workday function nor the networkdays function de-duplicate the list of holidays. This can lead to workday reporting a date that is later than the correct date and networkdays reporting fewer days than the correct number of working days.
I'm still quite new to Python so there may be better/more efficient ways of fixing this, but adding the following line to each of the functions should resolve the issue:
holidays = list(dict.fromkeys(holidays))
Neither the workday function nor the networkdays function de-duplicate the list of holidays. This can lead to workday reporting a date that is later than the correct date and networkdays reporting fewer days than the correct number of working days.
I'm still quite new to Python so there may be better/more efficient ways of fixing this, but adding the following line to each of the functions should resolve the issue:
holidays = list(dict.fromkeys(holidays))