Skip to content

Incorrect working days for Sweden #3118

@tomarw

Description

@tomarw

Problem Summary

After the recent update introducing holiday categories (PR #3096), we have observed issues with the is_working_day calculation for Sweden.

Context

Our software uses is_working_day for business logic—specifically planning, capacity, and delivery calculations. Previously, these calculations correctly matched Swedish holiday practice, but now some days previously treated as non-working have become working days.

Details

No combination of the current holiday categories seems to reliably determine if a day should be considered a working day in Sweden. Notably:

  • Adding the "optional" category causes inclusion of certain holidays, but also includes days which are typically working days (e.g., "Trettondagsafton", "Skärtorsdagen", "Valborgsmässoafton").
  • Three specific days (Midsummer’s Eve, Christmas Eve, and New Year’s Eve) are not official public holidays in Sweden but must be treated like Sundays according to Swedish Annual Leave Law (1977:480):

Public holidays and Midsummer’s Eve, Christmas Eve and New Year’s Eve shall be treated in the same manner as Sundays.
Source: Swedish Law (SFS 1977:480)

Original:

Med söndag jämställs allmän helgdag samt midsommarafton, julafton och nyårsafton.

Desired Outcome

We need a way to configure is_working_day such that it correctly respects Swedish holidays AND the special treatment for the three Eves named above.

Request for Guidance

We are happy to contribute a solution. Would you prefer:

  • Additional categories for these days?
  • Special handling in the is_working_day logic for Swedish holidays?
  • Another approach?

Please advise on your preferred design so our contribution aligns with project direction.


Thank you!

We appreciate your work and look forward to collaborating.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions