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

Add Belgium Region for School Holidays

Open DavidArbesu opened this issue 8 months ago • 4 comments

Proposed change Add Belgium Region for School Holidays

Type of change x New country/market holidays support (thank you!) x Supported country/market holidays update (calendar discrepancy fix, localization) Existing code/documentation/test/process quality improvement (best practice, cleanup, refactoring, optimization) Dependency update (version deprecation/pin/upgrade) Bugfix (non-breaking change which fixes an issue) Breaking change (a code change causing existing functionality to break) New feature (new holidays functionality in general) Checklist I've followed the contributing guidelines I've successfully run make check, all checks and tests are green

It's my very first contribue in GitHub.

I'm a Belgium. In my country, we have 3 "region" for school. Region Wallonie - Bruxelles; Flandres et Germanophone have 3 differents calendar holiday.

Can you add School Holiday?

Official Source:

Wallonie: http://www.enseignement.be/index.php?page=23953 Flandre: https://www.vlaanderen.be/onderwijs-en-vorming/wat-mag-en-moet-op-school/schoolvakanties-vrije-dagen-en-afwezigheden/schoolvakanties Germanophone: https://ostbelgienbildung.be/desktopdefault.aspx/tabid-2212/4397_read-31727/

DavidArbesu avatar Apr 28 '25 13:04 DavidArbesu

I'm working on this issue.

Aaqilyousuf avatar Sep 27 '25 11:09 Aaqilyousuf

@PPsyrius I’ve added initial support for Belgian school holiday subdivisions:

BE-WBR (Wallonia–Brussels Federation)

BE-VLG (Flemish Community)

BE-GER (German-speaking Community)

Right now, the dates in _populate_school_holidays() are just placeholders.

Before I implement real data, I’d like your guidance on what approach is preferred in this project:

Option A — Use placeholder dates only (as it is now) ✅ Simpler ✅ No extra annual updates ❌ Not accurate

Option B — Hardcode real holiday dates for specific years ✅ Accurate ❌ Needs maintaining each year

Option C — Implement logic based on school holiday rules (e.g. Autumn break = week of Nov 1; Carnival break = 7 weeks after Christmas in Flanders, etc.) ✅ Less manual maintenance ❌ Rules differ per community and can change over time

Which of these approaches would I implement? and I can implement rule-based logic for Flanders, because their school calendar has fixed rules since 2022. For Wallonia-Brussels and German-speaking, rules appear less consistent year to year. Would you prefer placeholder logic or year-specific hardcoding until official rules are confirmed?

Aaqilyousuf avatar Sep 30 '25 13:09 Aaqilyousuf

You can do this on a subdivision-specific holidays assignment, here's Austria's different BANK holidays for example: https://github.com/vacanza/holidays/blob/c68e6d6dccc969c47634537461725b5fcb479c16/holidays/countries/austria.py#L125 So in our case, this would've been:

    def _populate_school_holidays(self):
        # Any shared school holidays between the 3 regions goes here, if none - don't add this in.

    def _populate_subdiv_vlg_school_holidays(self):
        # Flemish Community Day.
        self._add_holiday_jul_11(tr("Feestdag van de Vlaamse Gemeenschap"))

        .
        .
        .

    def _populate_subdiv_wbr_school_holidays(self):
        # French Community Day.
        self._add_holiday_sep_27(tr("Feestdag van de Franse Gemeenschap"))

        .
        .
        .

For movable holidays, all the various Holiday Groups i.e. ChristianHolidays should already have things like _add_ash_wednesday (for Carnival Holidays's start date) readily available, else you can go for special syntactic sugar cases i.e. _add_holiday_10_days_past_easter or _add_holiday_1st_mon_of_nov. https://github.com/vacanza/holidays/blob/c68e6d6dccc969c47634537461725b5fcb479c16/holidays/groups/christian.py#L23 https://github.com/vacanza/holidays/blob/c68e6d6dccc969c47634537461725b5fcb479c16/holidays/holiday_base.py#L441

For unsure dates, just leave the code comments in and leave them unimplemented for now.

AFAIK none of the subdivisions above corresponds to https://en.wikipedia.org/wiki/ISO_3166-2:BE (and it doesn't fit the existing provincial borders too) - @arkid15r @KJhellico any idea on which sort of code to use here, do we want to do "French", "Flemish", "German" like New Zealand's special "South Canterbury" subdivision or all those Italian cities?

PPsyrius avatar Sep 30 '25 14:09 PPsyrius

do we want to do "French", "Flemish", "German"

Yes, I think, something like that. (There are also VLG / FWB / GER codes, but they are not official and I didn't realize how common they are)

KJhellico avatar Oct 03 '25 15:10 KJhellico