Skip to content

Update Bangladesh holidays: add Islamic holidays#3531

Merged
arkid15r merged 81 commits into
vacanza:devfrom
shaonahamed0:___new___holidays___
May 16, 2026
Merged

Update Bangladesh holidays: add Islamic holidays#3531
arkid15r merged 81 commits into
vacanza:devfrom
shaonahamed0:___new___holidays___

Conversation

@shaonahamed0

@shaonahamed0 shaonahamed0 commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Proposed change

I have added Islamic holidays for Bangladesh.

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

coderabbitai Bot commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Bangladesh holiday generator mixes in Christian and Islamic holiday groups, adds islamic_show_estimated/estimated_label, provides Bangladesh-specific confirmed Islamic dates, updates population logic with year gates and new observances, adds en_BD locale and PO updates, and expands tests.

Changes

Bangladesh holiday logic

Layer / File(s) Summary
Islamic calendar API
holidays/calendars/islamic.py
Adds JUMUATUL_WIDA constant, year→(month,day) mapping, and _IslamicLunar.jumuatul_wida_dates(year) accessor.
Islamic group generators
holidays/groups/islamic.py
Adds IslamicHolidays._add_jumuatul_wida and IslamicHolidays._add_mid_shaban_day; adds explicit return types on two methods.
Country imports & class wiring
holidays/countries/bangladesh.py
Bangladesh mixes in ChristianHolidays and IslamicHolidays, adds estimated_label and islamic_show_estimated init param, and initializes mixins/aliases.
Country holiday population
holidays/countries/bangladesh.py
Population logic gates Sheikh Mujibur Rahman’s birthday to ≤2024, adds July Mass Uprising Day (2025+), National Mourning Day (≤2024), Christmas, Islamic observances (Ashura, Mawlid, Mid‑Sha'ban, Laylat al‑Qadr, Jumu'atul‑Wida), and multi-day Eid variants.
Confirmed-date mappings
holidays/countries/bangladesh.py
BangladeshIslamicHolidays exported with confirmed year→(month,day) mappings for Ashura, Eid al‑Fitr, Eid al‑Adha, Jumu'atul‑Wida, Laylat al‑Qadr, Mawlid, and Mid‑Sha'ban.
Localization PO files & site assets
holidays/locale/ar/LC_MESSAGES/BD.po, holidays/locale/bn/LC_MESSAGES/BD.po, holidays/locale/en_US/LC_MESSAGES/BD.po, holidays/locale/en_BD/LC_MESSAGES/BD.po, scripts/generate_site_assets.py, README.md
PO headers bumped; added "%s (আনুমানিক)" translations; added Bengali msgids and Arabic/English translations/placeholders for the new holidays; added en_BD PO; updated site LANGUAGES mapping and README entry.
Tests
tests/countries/test_bangladesh.py
Tests adjusted for year-gated secular holidays, added July Mass Uprising Day and Christmas tests, expanded Islamic holiday assertions across multiple years (confirmed/estimated checks), updated localization expected sets for 2024, and removed the older test_2022.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • vacanza/holidays#3117: touches Bangladesh locale metadata and supported languages; related to localization changes in this PR.
  • vacanza/holidays#3480: earlier Bangladesh l10n wiring changes that overlap with the Arabic/English PO updates here.

Suggested labels

script

Suggested reviewers

  • arkid15r
  • KJhellico
  • PPsyrius
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 26.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding Islamic holidays to Bangladesh holiday support.
Description check ✅ Passed The description is directly related to the changeset, explaining the addition of Islamic holidays for Bangladesh with appropriate type classification and checklist completion.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tests/countries/test_bangladesh.py`:
- Around line 44-46: The test_july_uprising_day currently asserts the holiday
exists from 2024 onward using assertHolidayName but lacks explicit negative
coverage before 2024; add an assertNoHolidayName call for the pre-2024 years
(e.g., using a generator like (f"{year}-08-05" for year in
range(self.full_range.start, 2024) or range(self.min_year, 2024))) to ensure the
holiday is absent prior to its start year and keep the existing
assertHolidayName for the positive 2024+ range.
🪄 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: d8353f34-4746-4e6e-8169-abd4fbb91516

📥 Commits

Reviewing files that changed from the base of the PR and between 61a9a7e and beab191.

📒 Files selected for processing (5)
  • holidays/countries/bangladesh.py
  • holidays/locale/ar/LC_MESSAGES/BD.po
  • holidays/locale/bn/LC_MESSAGES/BD.po
  • holidays/locale/en_US/LC_MESSAGES/BD.po
  • tests/countries/test_bangladesh.py

Comment thread tests/countries/test_bangladesh.py Outdated
@codecov

codecov Bot commented Apr 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f1ed635) to head (1165be4).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3531   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          314       314           
  Lines        18775     18820   +45     
  Branches      2405      2408    +3     
=========================================
+ Hits         18775     18820   +45     

☔ 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.

Comment thread holidays/countries/bangladesh.py Outdated
@KJhellico KJhellico changed the title Update Bangladesh Holidays: Add New Holidays Support Update Bangladesh holidays: add July Mass Uprising Day holiday Apr 12, 2026
Comment thread tests/countries/test_bangladesh.py Outdated
Comment thread tests/countries/test_bangladesh.py Outdated
Comment thread holidays/countries/bangladesh.py Outdated
@shaonahamed0 shaonahamed0 changed the title Update Bangladesh holidays: add July Mass Uprising Day holiday Update Bangladesh holidays: add Religion holidays Apr 22, 2026

@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: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@holidays/countries/bangladesh.py`:
- Around line 59-69: Extract the Bangladesh-specific helper logic in
_add_mid_shaban_day and _add_jumuatul_wida and implement shared helpers in
holidays/groups/islamic.py (e.g., functions like add_mid_shaban_day(group,
calendar, year, name) and add_jumatul_wida_day(...)) that encapsulate the call
to the Islamic calendar _get_holiday logic (move the call to
_islamic_calendar._get_holiday into those shared helpers so country files no
longer call the calendar's private API directly). Then update Bangladesh’s
methods to simply call the new shared helpers with the translated names (keeping
_add_islamic_calendar_holiday_set usages in the shared helpers or adjusting to
call the existing helper _add_islamic_calendar_holiday_set as needed), and
remove the duplicated helper implementations from bangladesh.py.
- Around line 117-127: The code currently always adds three consecutive Eid days
by calling _add_eid_al_fitr_day, _add_eid_al_fitr_day_two,
_add_eid_al_fitr_day_three and the analogous _add_eid_al_adha_* methods; replace
this hardcoded sequence with Bangladesh-specific holiday-window logic: create or
call a lookup (e.g., get_bangladesh_eid_windows(year) or a per-year mapping)
that returns the exact date ranges for Eid al-Fitr and Eid al-Adha for the given
year and iterate over those ranges to add each holiday date via the existing add
methods (or a single generic add-day helper), ensuring that for years where the
window is shorter/longer or shifted you only add the official dates rather than
always three consecutive days.
- Around line 166-174: Update the JUMATUL_WIDA data so 2025 is not suppressed:
set JUMATUL_WIDA_DATES[2025] = (MAR, 28) and add 2025 to
JUMATUL_WIDA_DATES_CONFIRMED_YEARS (update the tuple currently containing (2022,
2026)). Ensure you use the existing MAR constant and run/update
tests/localization that reference JUMATUL_WIDA_DATES and
JUMATUL_WIDA_DATES_CONFIRMED_YEARS.

In `@tests/countries/test_bangladesh.py`:
- Around line 65-135: Replace the broad positive assertions that use
self.no_estimated_holidays with a confined verified-year window and explicitly
assert absence outside it: in test_ashura_day, test_eid_e_milad_un_nabi,
test_eid_al_fitr, and test_eid_al_adha, change the second assertHolidayName call
that uses range(self.start_year, self.end_year) to only cover range(2022, 2026)
(the verified 2022–2025 window), and add complementary negative checks for years
before 2022 and after 2025 (e.g., use the test helper that asserts a holiday
name is not present) so the no-estimated fixture only applies to the confirmed
years; references: self.no_estimated_holidays, assertHolidayName,
test_ashura_day, test_eid_e_milad_un_nabi, test_eid_al_fitr, test_eid_al_adha.
🪄 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: 656af20b-f916-4519-abc9-d219ce800c44

📥 Commits

Reviewing files that changed from the base of the PR and between 221768e and 50e2609.

📒 Files selected for processing (5)
  • holidays/countries/bangladesh.py
  • holidays/locale/ar/LC_MESSAGES/BD.po
  • holidays/locale/bn/LC_MESSAGES/BD.po
  • holidays/locale/en_US/LC_MESSAGES/BD.po
  • tests/countries/test_bangladesh.py

Comment thread holidays/countries/bangladesh.py Outdated
Comment thread holidays/countries/bangladesh.py
Comment thread holidays/countries/bangladesh.py
Comment thread tests/countries/test_bangladesh.py
Comment thread holidays/countries/bangladesh.py Outdated
Comment thread holidays/countries/bangladesh.py Outdated
Comment thread holidays/countries/bangladesh.py
Comment thread holidays/countries/bangladesh.py Outdated
Comment thread holidays/countries/bangladesh.py Outdated
Comment thread holidays/countries/bangladesh.py Outdated
Comment thread holidays/locale/ar/LC_MESSAGES/BD.po Outdated
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
Signed-off-by: Shaon Ahamed <shaonahmed8788@gmail.com>

@PPsyrius PPsyrius left a comment

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.

Aside from this and previous @KJhellico on en_US l10n standardisation for US holidays - the rest are LGTM

IMO if you want to preserve local holiday names as well, you might want to add a separate en_BD l10n.

Comment thread holidays/countries/bangladesh.py
Comment thread holidays/countries/bangladesh.py Outdated
Comment thread holidays/countries/bangladesh.py Outdated
shaonahamed0 and others added 4 commits May 14, 2026 14:28
Co-authored-by: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com>
Signed-off-by: Shaon Ahamed <shaonahmed8788@gmail.com>
Co-authored-by: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com>
Signed-off-by: Shaon Ahamed <shaonahmed8788@gmail.com>
Co-authored-by: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com>
Signed-off-by: Shaon Ahamed <shaonahmed8788@gmail.com>

@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: 1

🤖 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 `@scripts/generate_site_assets.py`:
- Line 127: The language display name for the "en_BD" entry in the site asset
map is misspelled ("Bangladehs"); update the value for the "en_BD" key in
generate_site_assets.py to "English (Bangladesh)" so the generated site assets
show the correct country name.
🪄 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: b75c646b-b472-4551-8c3e-f207b4add8fc

📥 Commits

Reviewing files that changed from the base of the PR and between dac0514 and 827e0b3.

📒 Files selected for processing (4)
  • README.md
  • holidays/countries/bangladesh.py
  • holidays/locale/en_BD/LC_MESSAGES/BD.po
  • scripts/generate_site_assets.py

Comment thread scripts/generate_site_assets.py Outdated
Signed-off-by: Shaon Ahamed <shaonahmed8788@gmail.com>
Comment thread holidays/locale/en_BD/LC_MESSAGES/BD.po
@shaonahamed0

Copy link
Copy Markdown
Contributor Author

Is everything correct now, or is there still something left to fix?

@KJhellico

Copy link
Copy Markdown
Collaborator

is there still something left to fix?

#3531 (comment)
#3531 (comment)
#3531 (comment)

shaonahamed0 and others added 2 commits May 16, 2026 21:03
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
Signed-off-by: Shaon Ahamed <shaonahmed8788@gmail.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
Signed-off-by: Shaon Ahamed <shaonahmed8788@gmail.com>
@shaonahamed0

Copy link
Copy Markdown
Contributor Author

Done✅

@sonarqubecloud

Copy link
Copy Markdown

@KJhellico KJhellico left a comment

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.

LGTM.

@arkid15r arkid15r left a comment

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.

👍

@arkid15r arkid15r enabled auto-merge May 16, 2026 18:29
@arkid15r arkid15r added this pull request to the merge queue May 16, 2026
Merged via the queue into vacanza:dev with commit 78579a8 May 16, 2026
32 checks passed
@KJhellico KJhellico mentioned this pull request May 18, 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.

4 participants