Skip to content

Update China holidays: add additional substituted holidays in 2019#3294

Merged
arkid15r merged 1 commit intovacanza:devfrom
KJhellico:upd-china
Feb 24, 2026
Merged

Update China holidays: add additional substituted holidays in 2019#3294
arkid15r merged 1 commit intovacanza:devfrom
KJhellico:upd-china

Conversation

@KJhellico
Copy link
Copy Markdown
Collaborator

Proposed change

Update China holidays: add additional substituted holidays in 2019.
Closes #3293.

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 Feb 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3120947 and e7989c8.

📒 Files selected for processing (3)
  • holidays/countries/china.py
  • snapshots/countries/CN_COMMON.json
  • tests/countries/test_china.py

Summary by CodeRabbit

  • Updates

    • Updated China's 2019 Labor Day holiday calendar with two additional days off on May 2-3, reflecting official government schedule adjustments and substitutions from April 28 and May 5.
  • Tests

    • Updated corresponding test cases to validate the new 2019 Labor Day holiday substitutions and workday adjustments.

Walkthrough

The PR adds Labor Day holiday substitutions for China in 2019, designating May 2–3 as substituted holidays replacing April 28 and May 5. This resolves the discrepancy where those two Sundays should be recognized as working days per official government announcements.

Changes

Cohort / File(s) Summary
China Holiday Definitions
holidays/countries/china.py
Added two Labor Day date ranges to ChinaStaticHolidays.special_public_holidays for 2019: May 2–April 28 and May 3–May 5.
Test Suite
tests/countries/test_china.py
Added assertions for 2019 substituted holidays (May 2–3) and corresponding workday adjustments (April 28, May 5) with references to official government sources.
Snapshot Data
snapshots/countries/CN_COMMON.json
Added two new entries documenting substituted days off for 2019-05-02 and 2019-05-03 with their respective date substitutions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • PR #3052 — Updates ChinaStaticHolidays.special_public_holidays with year-specific holiday ranges for a different year (2026), following the same pattern.

Suggested labels

snapshot, test

Suggested reviewers

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

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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 Title accurately describes the main change: adding substituted holidays for 2019 in China holidays data.
Description check ✅ Passed Description clearly relates to the changeset, explaining the update to China holidays and linking to issue #3293.
Linked Issues check ✅ Passed Changes fully address issue #3293 by marking 2019-04-28 and 2019-05-05 as working days through substituted holiday entries.
Out of Scope Changes check ✅ Passed All changes are scoped to 2019 China holiday substitutions per issue #3293; no unrelated modifications detected.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 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 Feb 24, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3294   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          307       307           
  Lines        18384     18384           
  Branches      2353      2353           
=========================================
  Hits         18384     18384           

☔ 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
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 February 24, 2026 22:26
@arkid15r arkid15r added this pull request to the merge queue Feb 24, 2026
Merged via the queue into vacanza:dev with commit a506e43 Feb 24, 2026
32 checks passed
@KJhellico KJhellico deleted the upd-china branch February 24, 2026 23:40
@KJhellico KJhellico mentioned this pull request Mar 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.

Chinese calendar: missing working weekend sundays 2019-04-28 and 2019-05-05 in 2019

2 participants