python-holidays icon indicating copy to clipboard operation
python-holidays copied to clipboard

Add Bonaire, Sint Eustatius and Saba holidays

Open Prateekshit73 opened this issue 6 months ago • 6 comments

Proposed change

Add Bonaire, Sint Eustatius and Saba holidays. Resolves #2413

Type of change

  • [x] 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

  • [x] I've followed the contributing guidelines
  • [x] I've successfully run make check, all checks and tests are green

Prateekshit73 avatar Jun 19 '25 18:06 Prateekshit73

Summary by CodeRabbit

  • New Features

    • Added support for public holidays in Bonaire, Sint Eustatius, and Saba, including subdivision-specific holidays and aliases.
    • Introduced localization for holiday names in English (US and Bonaire), Dutch, and Papiamentu.
    • Holiday data is now available for these regions from 2011 to 2050.
  • Documentation

    • Updated documentation to reflect the addition of Bonaire, Sint Eustatius, and Saba as a supported country code.
  • Tests

    • Added comprehensive tests for holiday dates, names, subdivisions, aliases, and localization for Bonaire, Sint Eustatius, and Saba.

Summary by CodeRabbit

  • New Features

    • Added support for holidays in Bonaire, Sint Eustatius, and Saba (country code BQ/BES), including all major public holidays from 2011 onward.
    • Introduced localization for holiday names in English (US), English (BQ), Dutch, and Papiamentu.
    • Added subdivision-specific holidays for Bonaire, Saba, and Sint Eustatius.
    • Defined country aliases BQ and BES for convenience.
  • Documentation

    • Updated documentation to reflect the addition of Bonaire, Sint Eustatius, and Saba as a supported country.
  • Tests

    • Added comprehensive tests to verify holiday dates, aliases, subdivisions, and localization for Bonaire, Sint Eustatius, and Saba.

Walkthrough

Support for Bonaire, Sint Eustatius, and Saba holidays was added. This includes a new country module, registry updates, localization files for multiple languages, a test suite, documentation changes, and snapshot data for holidays from 2011 to 2050.

Changes

Files/Group Change Summary
holidays/countries/bonaire_sint_eustatius_and_saba.py New module: Defines holiday logic, subdivisions, and aliases for Bonaire, Sint Eustatius, and Saba.
holidays/countries/__init__.py, holidays/registry.py Imports and registers the new country and its codes.
holidays/locale/en_BQ/LC_MESSAGES/BQ.po,
holidays/locale/en_US/LC_MESSAGES/BQ.po,
holidays/locale/nl/LC_MESSAGES/BQ.po,
holidays/locale/pap_BQ/LC_MESSAGES/BQ.po
Adds localization files for English (BQ, US), Dutch, and Papiamentu for the new country.
snapshots/countries/BQ_COMMON.json Adds holiday snapshot data for BQ from 2011 to 2050.
snapshots/countries/BQ_BON.json Adds holiday snapshot data for Bonaire subdivision from 2011 to 2050.
snapshots/countries/BQ_SAB.json Adds holiday snapshot data for Saba subdivision from 2011 to 2050.
snapshots/countries/BQ_STA.json Adds holiday snapshot data for Sint Eustatius subdivision from 2011 to 2050.
tests/countries/test_bonaire_sint_eustatius_and_saba.py Adds a new test suite for BQ holidays, including localization, aliases, subdivisions, and date checks.
README.md Updates documentation to reflect the addition of BQ.

Assessment against linked issues

Objective Addressed Explanation
Add Bonaire, Sint Eustatius and Saba holidays (#2413)
Provide localization for supported languages (#2413)
Register new country and aliases in registry and init files (#2413)
Add tests for holiday logic, aliases, and localization (#2413)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes found.

Suggested reviewers

  • KJhellico
  • PPsyrius
✨ Finishing Touches
  • [ ] 📝 Generate Docstrings
🧪 Generate Unit Tests
  • [ ] 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Jun 19 '25 18:06 coderabbitai[bot]

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 100.00%. Comparing base (0905697) to head (ee4c8f3). :warning: Report is 169 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2651   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          254       255    +1     
  Lines        15265     15310   +45     
  Branches      2098      2100    +2     
=========================================
+ Hits         15265     15310   +45     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Jun 19 '25 18:06 codecov[bot]

And you need to run make l10n for .po files update.

KJhellico avatar Jun 24 '25 19:06 KJhellico

Full law for the Netherlands Antilles from July 27th, 2000 - I've checked and these are still in place for this entity: https://lokaleregelgeving.overheid.nl/CVDR10375/1 (found this by chance when refactoring Curacao's code)

PPsyrius avatar Jun 25 '25 07:06 PPsyrius