Update Ghana holidays: add 2026 special public holidays - #3703
Conversation
Under Section 2 of the Public Holidays and Commemorative Days Act (Act 601), the President moved two 2026 weekday holidays to Friday by Executive Instrument: Constitution Day to Fri 9 January and Republic Day to Fri 3 July. Add them via a new GhanaStaticHolidays class. Signed-off-by: uttam12331 <uttam12331@users.noreply.github.com>
WalkthroughChangesGhana holiday substitutions
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/countries/test_ghana.py`:
- Line 42: Add a test_2026 method in the Ghana calendar tests, following the
structure of test_2023 and test_2024, with a full-year holiday assertion.
Explicitly verify the expected handling of Constitution Day on 2026-01-07
alongside the new 2026-01-09 holiday.
- Line 41: Update the assertNoHolidayName call in the Ghana holiday test to use
self.end_year as the upper range boundary instead of the hardcoded 2050,
preserving the existing year ranges and assertion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: fb370841-cdc8-40f7-9de9-6876ce579138
📒 Files selected for processing (2)
holidays/countries/ghana.pytests/countries/test_ghana.py
| * [Constitution Day observed 2026](https://www.mint.gov.gh/declaration-of-friday-9th-january2026-as-a-public-holiday/) | ||
| * [Republic Day observed 2026](https://www.mint.gov.gh/declaration-of-friday-3rd-july-2026-as-a-public-holiday/) | ||
| """ | ||
|
|
||
| # Constitution Day. | ||
| constitution_day = "Constitution Day" | ||
| # Republic Day. | ||
| republic_day = "Republic Day" | ||
|
|
||
| special_public_holidays = { | ||
| 2026: ( | ||
| (JAN, 9, constitution_day), | ||
| (JUL, 3, republic_day), |
There was a problem hiding this comment.
| * [Constitution Day observed 2026](https://www.mint.gov.gh/declaration-of-friday-9th-january2026-as-a-public-holiday/) | |
| * [Republic Day observed 2026](https://www.mint.gov.gh/declaration-of-friday-3rd-july-2026-as-a-public-holiday/) | |
| """ | |
| # Constitution Day. | |
| constitution_day = "Constitution Day" | |
| # Republic Day. | |
| republic_day = "Republic Day" | |
| special_public_holidays = { | |
| 2026: ( | |
| (JAN, 9, constitution_day), | |
| (JUL, 3, republic_day), | |
| * [Jan 9, 2026 holiday](https://web.archive.org/web/20260510090514/https://www.mint.gov.gh/declaration-of-friday-9th-january2026-as-a-public-holiday/) | |
| * [Jul 3, 2026 holiday](https://web.archive.org/web/20260717133104/https://www.mint.gov.gh/declaration-of-friday-3rd-july-2026-as-a-public-holiday/) | |
| """ | |
| # Public Holiday. | |
| public_holiday = "Public Holiday" | |
| special_public_holidays = { | |
| 2026: ( | |
| (JAN, 9, public_holiday), | |
| (JUL, 3, public_holiday), |
An official source refers to these holidays simply as "Public Holiday".
BTW, we missed that Republic Day has been moved from Commemorative Days to Statutory Public Holidays. This also needs to be updated (either now or later).
| ObservedHolidayBase, | ||
| ChristianHolidays, | ||
| InternationalHolidays, | ||
| IslamicHolidays, | ||
| StaticHolidays, |
There was a problem hiding this comment.
| ObservedHolidayBase, | |
| ChristianHolidays, | |
| InternationalHolidays, | |
| IslamicHolidays, | |
| StaticHolidays, | |
| ObservedHolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays, StaticHolidays |
| def test_2026_substitute_holidays(self): | ||
| # Executive Instruments moving 2026 weekday holidays to Friday. | ||
| self.assertHoliday("2026-01-09", "2026-07-03") | ||
| self.assertHolidayName("Constitution Day", "2026-01-09") | ||
| self.assertHolidayName("Republic Day", "2026-07-03") | ||
| self.assertNoHolidayName("Republic Day", range(2019, 2026), range(2027, 2050)) |
There was a problem hiding this comment.
| def test_2026_substitute_holidays(self): | |
| # Executive Instruments moving 2026 weekday holidays to Friday. | |
| self.assertHoliday("2026-01-09", "2026-07-03") | |
| self.assertHolidayName("Constitution Day", "2026-01-09") | |
| self.assertHolidayName("Republic Day", "2026-07-03") | |
| self.assertNoHolidayName("Republic Day", range(2019, 2026), range(2027, 2050)) | |
| def test_special_holidays(self): | |
| self.assertHoliday( | |
| "2026-01-09", | |
| "2026-07-03", | |
| ) |



Proposed change
Under Section 2 of Ghana's Public Holidays and Commemorative Days Act (Act 601), when a statutory holiday falls on a weekday the President may declare the following Friday a public holiday. For 2026, two such Executive Instruments were issued:
Adds both via a new
GhanaStaticHolidaysclass.Source
Checklist
2026-01-09= "Constitution Day",2026-07-03= "Republic Day"; absent other years.tests/countries/test_ghana.pypasses (23 passed);ruffclean.Note: I kept the labels as plain "Constitution Day" / "Republic Day"; happy to switch to the "(observed)" convention if you'd prefer.