In some countries, certain observances are not officially 'public holidays' but are legally treated as such for calculating working days (e.g., in Sweden). To ensure accurate is_working_day() behavior in these cases, you must include the DE_FACTO category when initializing the country object.
import holidays
from holidays.constants import PUBLIC, DE_FACTO
# In Sweden, Midsummer Eve is DE_FACTO, not PUBLIC.
# Including DE_FACTO ensures is_working_day() returns False for it.
se = holidays.Sweden(categories=(PUBLIC, DE_FACTO), years=2024)
print(se.is_working_day('2024-12-24')) # False