Skip to content

Update Australia holidays: add extra ANZAC Day holiday in NSW#3273

Merged
arkid15r merged 5 commits intovacanza:devfrom
simongreen-net:anzac-day-nsw-2026
Feb 16, 2026
Merged

Update Australia holidays: add extra ANZAC Day holiday in NSW#3273
arkid15r merged 5 commits intovacanza:devfrom
simongreen-net:anzac-day-nsw-2026

Conversation

@simongreen-net
Copy link
Copy Markdown
Contributor

Proposed change

Add an additional holiday for ANZAC Day in the NSW subdivision of Australia for the next two years only. The NSW government have announced that

Mr Minns announced on Sunday the government would be making the Monday after Anzac Day a public holiday in 2026 and 2027 for residents in New South Wales.

The legislative instrument has not yet been created. Given that the holiday is just over two months away, I thought it would be good to create a the PR now. Let me know if you want to wait until the necessary laws have actually passed parliament.

WBM: https://web.archive.org/web/20260215015505/https://www.abc.net.au/news/2026-02-15/nsw-minns-government-anzac-day-extra-public-holiday/106346332

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 15, 2026

Caution

Review failed

Failed to post review comments

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

Summary by CodeRabbit

  • Bug Fixes

    • Corrected ANZAC Day observed date handling for New South Wales and the Australian Capital Territory for 2026–2027.
  • Tests

    • Added/updated tests covering ANZAC Day and its observed variants across Australian states (including NSW and WA) for 2026–2027.
  • Documentation

    • Added a reference link for NSW public holidays 2026–2027.

Walkthrough

ANZAC Day observed-date logic gains a 2026–2027-specific branch: NSW (and ACT/WA where applicable) now uses SAT_SUN_TO_NEXT_MON for observed ANZAC Day in those years; tests updated to assert observed dates for NSW and WA; a NSW 2026–2027 reference link was added.

Changes

Cohort / File(s) Summary
Holiday logic
holidays/countries/australia.py
Add 2026–2027-specific branch so NSW/ACT/WA use SAT_SUN_TO_NEXT_MON for observed ANZAC Day in 2026–2027; retain prior-year rules; add NSW 2026–2027 reference link.
Tests
tests/countries/test_australia.py
Extend ANZAC Day tests: assert ANZAC Day on 2026-04-25 and ANZAC Day (observed) on 2026-04-27 and 2027-04-26 for NSW and WA; ACT behavior unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • PPsyrius
🚥 Pre-merge checks | ✅ 3 | ❌ 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 (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding an extra ANZAC Day holiday in NSW for 2026-2027.
Description check ✅ Passed The description is directly related to the changeset, providing context about the NSW government announcement and the new ANZAC Day observance rules.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into dev

✏️ 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

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

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.

Caution

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

⚠️ Outside diff range comments (1)
tests/countries/test_australia.py (1)

142-156: 🧹 Nitpick | 🔵 Trivial

Consider adding a 2027 assertion for NSW.

The implementation covers both 2026 and 2027, but only 2026 is tested here. In 2027, Apr 25 falls on Sunday — still triggers SAT_SUN_TO_NEXT_MON for NSW. WA already handles Sunday via its existing _add_observed(dt) for all years ≥ 1973, so WA's 2027 behavior isn't novel. But the NSW 2027 path is new and untested.

Suggested addition
             elif subdiv in ("NSW", "WA"):
                 self.assertHolidayName(name, holidays, "2026-04-25")
                 self.assertHolidayName(observed_name, holidays, "2026-04-27")
+
+            if subdiv == "NSW":
+                self.assertHolidayName(name, holidays, "2027-04-25")
+                self.assertHolidayName(observed_name, holidays, "2027-04-27")

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 15, 2026
@KJhellico KJhellico changed the title Add extra ANZAC Day holiday in NSW Update Australia holidays: add extra ANZAC Day holiday in NSW Feb 15, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 15, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3273   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          307       307           
  Lines        18371     18373    +2     
  Branches      2351      2352    +1     
=========================================
+ Hits         18371     18373    +2     

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

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 16, 2026
coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 16, 2026
coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 16, 2026
@simongreen-net
Copy link
Copy Markdown
Contributor Author

The change is now listed on the NSW Govt website, and I have added a WBM link to the pull request.

PPsyrius
PPsyrius previously approved these changes Feb 16, 2026
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 🇦🇺

KJhellico
KJhellico previously approved these changes Feb 16, 2026
Copy link
Copy Markdown
Collaborator

@KJhellico KJhellico left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

@simongreen-net thanks for keeping this up to date!

@sonarqubecloud
Copy link
Copy Markdown

@arkid15r arkid15r added this pull request to the merge queue Feb 16, 2026
Merged via the queue into vacanza:dev with commit ce4cf40 Feb 16, 2026
32 checks passed
@simongreen-net simongreen-net deleted the anzac-day-nsw-2026 branch March 24, 2026 13:13
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.

4 participants