python-holidays icon indicating copy to clipboard operation
python-holidays copied to clipboard

Allow listing only observed holidays.

Open mscavnicky opened this issue 4 months ago • 2 comments

Is your feature request related to a problem? Please describe. When retrieve country holidays with observed=True, both the "statutory" and "observed" dates are provided. This feels unnatural as it basically duplicates the holiday. For my use case, only the observed dates are relevant.

Describe the solution you'd like The API should allow to specify whether:

  • one wants only the statutory holidays (currently observed=False)
  • one wants only the observed holidays (MISSING)
  • one wants both statutory and observed holidays (currently observed=True)

Describe alternatives you've considered Currently, I have to filter out the statutory holidays myself, using string matching. Maybe there's a simple solution somewhere in the API that I have not found?

mscavnicky avatar Aug 27 '25 17:08 mscavnicky

It seems that here we have a terminology issue. In our project, "observed" is non-working days that occur as a result of holidays that fall on a weekend (or coincide with other holidays, depending on the country). As far as I understand, you mean something else.

KJhellico avatar Aug 27 '25 19:08 KJhellico

@mscavnicky, could you explain in more detail what exactly you need (using some country as an example), please?

KJhellico avatar Aug 27 '25 19:08 KJhellico