Skip to content

De-duplicate list of holidays #13

@PSimbo

Description

@PSimbo

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))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions