-
Notifications
You must be signed in to change notification settings - Fork 5
Australia ANZAC Day 2026 Changes #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
au.yaml
Outdated
mday: 25 | ||
function: to_monday_if_weekend(date) | ||
year_ranges: | ||
- before: 2025 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically in the past, if the holiday was on the weekend people also got the Monday as a holiday. That appears to have been stopped except for WA.
And some refactoring and fixes to the anzac day test cases.
au.yaml
Outdated
regions: [au_nsw, au_sa, au_tas, au_vic, au_act, au_wa, au_qld, au_nt] | ||
mday: 25 | ||
year_ranges: | ||
- after: 2026 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going forward every state has ANZAC Day on the 25th. See https://www.fairwork.gov.au/employment-conditions/public-holidays/2026-public-holidays
au.yaml
Outdated
regions: [au_wa] | ||
mday: 25 | ||
function: additional_anzac_on_monday_if_on_weekend(date) | ||
function: to_monday_if_weekend(date) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving forward only WA gets the additional holiday on the Monday when ANZAC day is on a weekend
date: '2026-04-27' | ||
regions: ["au_nsw", "au_act", "au_vic", "au_tas", "au_sa", "au_nt", "au_qld"] | ||
expect: | ||
holiday: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the ANZAC day tests are consolidated in one section here. Some of these are just documenting the existing behaviour. Some new tests document the 2025 to 2026+ changes.
regions: ["au_qld"] | ||
expect: | ||
name: 'Additional public holiday for Boxing Day' | ||
name: 'Additional public holiday Boxing Day' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The remaining changes are just "making the tests pass". These tests do not seem to have been maintained and I don't think get run in any pipeline. Note that there are no corresponding holiday definition changes. These changes are just purely getting the tests to pass with the existing definitions.
Note that the tests are only run against the definitions in the related holidays project. If you run the AU tests there then they all pass with these changes.
class InvalidMonth < Error; end | ||
class InvalidMethod < Error; end | ||
class InvalidRegions < Error; end | ||
class MissingDateSpecification < Error; end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of a side quest. While trying to debug my changes I thought I had a need for an additional validation on the definitions. Turns out it was user error. But its here now so...
Moves to Monday if falls on Sunday. Discovered after I googled it. Added tests out to 2035. Some refactoring of the definition file.
This function only provides the holiday on Monday if the date is on the weekend. The problem with to_monday_if_weekend is that you end up with two holidays on the same date.
Updates to ANZAC day definitions for 2026
Part of ENG-2028
Source of truth Fair Work Public Holidays
Important
Should be reviewed with related PR in the holidays project
Testing
For testing compare the above doc to what is in the definition file.
Checkout the project, run bundle install and then run
make test
. This runs some tests on the code in this project and some validations on the structure of the definitions file.The definitions file does have a section on tests which define tests for the holiday definitions. These tests are used to generate test code that is run in the holidays project. You need to also review that project and follow the testing steps there.