Update Germany holidays: add SCHOOL holidays category support#3171
Update Germany holidays: add SCHOOL holidays category support#3171Ulyzzeus wants to merge 8 commits intovacanza:devfrom
SCHOOL holidays category support#3171Conversation
Updated project version and revision date in localization file. Added German holiday terms for localization. Signed-off-by: Ulyzzeus <103255220+Ulyzzeus@users.noreply.github.com>
Updated project version and revision date in localization file. Added new holiday translations for various terms. Signed-off-by: Ulyzzeus <103255220+Ulyzzeus@users.noreply.github.com>
Signed-off-by: Ulyzzeus <103255220+Ulyzzeus@users.noreply.github.com>
Updated project version and revision date in DE.po. Added new holiday terms for localization. Signed-off-by: Ulyzzeus <103255220+Ulyzzeus@users.noreply.github.com>
|
Caution Review failedFailed to post review comments Summary by CodeRabbitRelease Notes
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughThis PR adds SCHOOL holiday category support to Germany with per-year and per-subdivision population methods. Includes version bump to 0.88, localization updates across multiple languages, and comprehensive test coverage for school holiday ranges. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| # (keeps per-year population semantics for school holiday checks). | ||
| self.expand = False | ||
|
|
||
| def _add_school_holidays_hh(self, year): |
There was a problem hiding this comment.
To add school holidays on a per subdiv basis, you can use def _populate_subdiv_{subdiv code}_public_holidays(self): but I would recommend moving these after each subdiv-specific public holidays assignment
| def _add_school_holidays_hh(self, year): | |
| def _populate_subdiv_hh_school_holidays(self): |
| def _add_holiday_range(name, start_date, end_date): | ||
| current_date = start_date | ||
| while current_date <= end_date: | ||
| if current_date.year == self._year: | ||
| # Ensure holiday is added for the populated year by passing | ||
| # month and day to _add_holiday so it constructs the date | ||
| # using `self._year` (prevents cross-year leakage). | ||
| self._add_holiday(name, current_date.month, current_date.day) | ||
| current_date += timedelta(days=1) |
There was a problem hiding this comment.
We actually have self._add_multiday_holiday method for this - i.e.
holidays/holidays/countries/mongolia.py
Line 160 in 0f65700
if self._year >= 2007:
# New Harvest Days.
self._add_multiday_holiday(self._add_holiday_sep_5(tr("Шинэ ургацын өдрүүд")), 45)holidays/holidays/countries/thailand.py
Line 324 in 0f65700
elif self._year <= 1925:
self._add_multiday_holiday(
# Songkran New Year Holidays.
self._add_holiday_mar_28(tr("พระราชพิธีตะรุษะสงกรานต์ แลนักขัตฤกษ์")),
18,
)SCHOOL holidays category support
| holidays_map = [] | ||
|
|
||
| if year == 2025: | ||
| holidays_map = [ |
There was a problem hiding this comment.
Better to rely not just on a list of dates, but to identify the rules that they follow.
|
@Ulyzzeus, are you planning to update and finish this PR? |
|
Yes. I am swamped with work ATM but I'll get back to it by end of February at the latest
|
Any progress? |


Proposed change
Added school holidays for every subdivision of Germany.
Type of change
holidaysfunctionality in general)Checklist
make checklocally; all checks and tests passed.