Skip to content

Update Brunei holidays: observed holidays, 2026 exact dates#3228

Merged
arkid15r merged 1 commit intovacanza:devfrom
KJhellico:upd-brunei
Jan 21, 2026
Merged

Update Brunei holidays: observed holidays, 2026 exact dates#3228
arkid15r merged 1 commit intovacanza:devfrom
KJhellico:upd-brunei

Conversation

@KJhellico
Copy link
Copy Markdown
Collaborator

Proposed change

Update Brunei holidays:

  • observed holidays calculation
  • Islamic holidays 2026 exact dates

Type of change

  • New country/market holidays support (thank you!)
  • 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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 19, 2026

Summary by CodeRabbit

  • New Features

    • Extended Islamic holiday data for Brunei through 2026, including Eid al-Fitr, Eid al-Adha, Ramadan, and related observances.
    • Improved weekend holiday observation rules to better handle holidays falling on Fridays and Sundays.
  • Bug Fixes

    • Enhanced handling for multiple holidays falling on the same date with more accurate observance designations.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Brunei holiday handling refactored to use batch-processing of observed dates with a new _populate_observed method, consolidating observed-holiday logic. Islamic holiday dates expanded to 2026. New FRI_SUN_TO_NEXT_WORKDAY observed rule added. Locale translations and snapshot data updated accordingly.

Changes

Cohort / File(s) Summary
Core Holiday Logic
holidays/countries/brunei.py, holidays/observed_holiday_base.py
Introduced BN_WORKDAY_TO_NEXT_WORKDAY ObservedRule and refactored public holiday population to accumulate observed dates in a set and apply them in batch via _populate_observed. Updated Eid al-Fitr/al-Adha logic. Extended Islamic holiday date tables to 2026. Removed special_public_holidays_observed mapping.
Localization
holidays/locale/en_US/LC_MESSAGES/BN.po, holidays/locale/ms/LC_MESSAGES/BN.po, holidays/locale/th/LC_MESSAGES/BN.po
Added and removed translation entries for Islamic New Year and Prophet's Birthday; net effect varies by locale (en_US, ms show zero change; th exhibits internal relocation).
Test Snapshots
snapshots/countries/BN_COMMON.json
Expanded snapshot data across multiple years with refined observance statuses. Updated holiday labels for existing entries and added new observed/estimated entries across decades, particularly for Islamic and national holidays.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested labels

l10n, snapshot

Suggested reviewers

  • PPsyrius
  • arkid15r
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the two main changes: observed holidays calculation updates and 2026 exact dates for Islamic holidays in Brunei.
Description check ✅ Passed The description clearly outlines the proposed changes—observed holidays calculation and Islamic holidays 2026 dates—which align with the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (68365d4) to head (aa70f95).
⚠️ Report is 4 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3228   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          307       307           
  Lines        18314     18309    -5     
  Branches      2339      2330    -9     
=========================================
- Hits         18314     18309    -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
holidays/countries/brunei.py (1)

223-240: EID_AL_ADHA and MAWLID are missing 2026 entries despite CONFIRMED_YEARS including 2026.

EID_AL_ADHA_DATES and MAWLID_DATES lack explicit 2026 entries, but their CONFIRMED_YEARS ranges extend to 2026. This creates an inconsistency: the library will use algorithmic dates for 2026 and mark them as confirmed, conflicting with the explicit-dates-only pattern used for EID_AL_FITR, HIJRI_NEW_YEAR, ISRA_AND_MIRAJ, and RAMADAN_BEGINNING (which all have 2026 entries).

Either add the verified 2026 dates for both holidays, or reduce CONFIRMED_YEARS to (1998, 2025):

🛠️ Conservative fix (if 2026 dates unavailable)
-    EID_AL_ADHA_DATES_CONFIRMED_YEARS = (1998, 2026)
+    EID_AL_ADHA_DATES_CONFIRMED_YEARS = (1998, 2025)
...
-    MAWLID_DATES_CONFIRMED_YEARS = (1998, 2026)
+    MAWLID_DATES_CONFIRMED_YEARS = (1998, 2025)

Copy link
Copy Markdown
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

LGTM

@arkid15r arkid15r enabled auto-merge January 20, 2026 04:12
Copy link
Copy Markdown
Collaborator

@PPsyrius PPsyrius left a comment

Choose a reason for hiding this comment

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

LGTM 🇧🇳

@arkid15r arkid15r added this pull request to the merge queue Jan 21, 2026
Merged via the queue into vacanza:dev with commit 095e64d Jan 21, 2026
32 checks passed
@KJhellico KJhellico deleted the upd-brunei branch January 21, 2026 09:41
@KJhellico KJhellico mentioned this pull request Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants