Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance TestCase::assertLocalizedHolidays #2115

Closed
KJhellico opened this issue Nov 7, 2024 · 2 comments · Fixed by #2117
Closed

Enhance TestCase::assertLocalizedHolidays #2115

KJhellico opened this issue Nov 7, 2024 · 2 comments · Fixed by #2117
Assignees

Comments

@KJhellico
Copy link
Collaborator

TestCase::assertLocalizedHolidays now considers all categories of holidays, but doesn't consider subdivisions holidays. However, in Switzerland, for example, there are only a few national holidays, and the test looks like this:

    def test_l10n_en_us(self):
        self.assertLocalizedHolidays(
            "en_US",
            ("2023-01-01", "New Year's Day"),
            ("2023-05-18", "Ascension Day"),
            ("2023-08-01", "National Day"),
            ("2023-12-25", "Christmas Day"),
        )

If we include provincial holidays, the test will look like this:

    def test_l10n_en_us(self):
        self.assertLocalizedHolidays(
            "en_US",
            ("2023-01-01", "New Year's Day"),
            ("2023-01-02", "Berchtold's Day"),
            ("2023-01-06", "Epiphany"),
            ("2023-03-01", "Republic Day"),
            ("2023-03-19", "Saint Joseph's Day"),
            ("2023-04-07", "Good Friday"),
            ("2023-04-10", "Easter Monday"),
            ("2023-04-13", "Battle of Naefels Victory Day"),
            ("2023-05-01", "Labor Day"),
            ("2023-05-18", "Ascension Day"),
            ("2023-05-29", "Whit Monday"),
            ("2023-06-08", "Corpus Christi"),
            ("2023-06-23", "Independence Day"),
            ("2023-06-29", "Saints Peter and Paul"),
            ("2023-08-01", "National Day"),
            ("2023-08-15", "Assumption Day"),
            ("2023-09-07", "Genevan Fast"),
            ("2023-09-18", "Prayer Monday"),
            ("2023-09-25", "Saint Nicholas of Flüe"),
            ("2023-11-01", "All Saints' Day"),
            ("2023-12-08", "Immaculate Conception"),
            ("2023-12-25", "Christmas Day"),
            ("2023-12-26", "Saint Stephen's Day"),
            ("2023-12-31", "Restoration Day"),
        )

Should we do this or is it an impractical overkill?

@arkid15r
Copy link
Collaborator

arkid15r commented Nov 7, 2024

Yes, it'd be great to have subdivs covered as well. I didn't look into the implementation details yet.
@KJhellico do you want to work on the implementation?

@KJhellico KJhellico self-assigned this Nov 7, 2024
@KJhellico
Copy link
Collaborator Author

Yes, I am already on it. 😋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants