Skip to content

Update Ghana holidays: add 2026 special public holidays - #3703

Open
uttam12331 wants to merge 1 commit into
vacanza:devfrom
uttam12331:ghana-2026-substitute-holidays
Open

Update Ghana holidays: add 2026 special public holidays#3703
uttam12331 wants to merge 1 commit into
vacanza:devfrom
uttam12331:ghana-2026-substitute-holidays

Conversation

@uttam12331

Copy link
Copy Markdown
Contributor

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:

  • Constitution Day (statutory Wed 7 Jan) → public holiday on Fri 9 January 2026
  • Republic Day (statutory Wed 1 Jul) → public holiday on Fri 3 July 2026

Adds both via a new GhanaStaticHolidays class.

Source

  • Ghana Ministry of the Interior — Declaration of Friday, 9th January 2026 as a Public Holiday and Declaration of Friday, 3rd July 2026 as a Public Holiday (mint.gov.gh); Graphic Online / GNA.

Checklist

  • 2026-01-09 = "Constitution Day", 2026-07-03 = "Republic Day"; absent other years.
  • tests/countries/test_ghana.py passes (23 passed); ruff clean.
  • Commit signed off (DCO).

Note: I kept the labels as plain "Constitution Day" / "Republic Day"; happy to switch to the "(observed)" convention if you'd prefer.

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>
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Changes

Ghana holiday substitutions

Layer / File(s) Summary
Define and wire Ghana static holidays
holidays/countries/ghana.py
Ghana integrates GhanaStaticHolidays, defining 2026 observed dates for Constitution Day and Republic Day.
Validate 2026 substitutions
tests/countries/test_ghana.py
Tests verify the substituted Friday dates and Republic Day behavior in non-substituted years.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: arkid15r, kjhellico

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: adding Ghana's 2026 special public holidays.
Description check ✅ Passed The description matches the changeset and explains the added 2026 Ghana holiday rules and tests.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between c861015 and d8cc80d.

📒 Files selected for processing (2)
  • holidays/countries/ghana.py
  • tests/countries/test_ghana.py

Comment thread tests/countries/test_ghana.py
Comment thread tests/countries/test_ghana.py

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

Comment on lines +127 to +139
* [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),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* [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).

Comment on lines +28 to +32
ObservedHolidayBase,
ChristianHolidays,
InternationalHolidays,
IslamicHolidays,
StaticHolidays,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ObservedHolidayBase,
ChristianHolidays,
InternationalHolidays,
IslamicHolidays,
StaticHolidays,
ObservedHolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays, StaticHolidays

Comment on lines +36 to +41
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))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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",
)

@KJhellico KJhellico changed the title Add Ghana 2026 substitute public holidays Update Ghana holidays: add 2026 special public holidays Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants