Fix NT Picnic Day: first Monday of August (DEV-30999) - #14
Merged
mikkotansc merged 1 commit intoJul 24, 2026
Merged
Conversation
Picnic Day (au_nt) was defined as a hardcoded Date.civil(year, 8, 4), which only coincidentally matched the real holiday in 2025. NT Picnic Day is legislated as the first Monday of August, so 2026 (Mon 3 Aug) and 2027 (Mon 2 Aug) resolved incorrectly to the 4th. Compute the first Monday of August via day_of_month_calculator, mirroring the existing qld_queens_bday_october definition. Keeps the `year >= 2025` gate so pre-2025 historical data is unchanged. Generated: Australia. Regenerated au.rb + test/defs/test_defs_au.rb via `rake generate` (unrelated REGIONS.rb/nz.rb generator drift excluded).
There was a problem hiding this comment.
Pull request overview
Updates the Northern Territory (AU-NT) “Picnic Day” holiday definition so it correctly follows legislation (first Monday of August) instead of a hardcoded August 4th date, preventing incorrect holiday population in downstream payroll/timesheet flows.
Changes:
- Replaced the fixed
Date.civil(year, 8, 4)computation with a “first Monday of August” calculation foryear >= 2025. - Added regression test cases for 2025–2027 and a negative assertion for the previously-buggy 2026-08-04 case in both the YAML tests block and the generated AU defs test file.
- Regenerated the AU generated definitions to reflect the updated custom method.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
definitions/au.yaml |
Updates picnic_day_from_2025 to compute the first Monday of August and adds regression assertions in the YAML tests: block. |
lib/generated_definitions/au.rb |
Regenerates the AU custom method implementation to use DateCalculatorFactory.day_of_month_calculator for Picnic Day. |
test/defs/test_defs_au.rb |
Adds explicit regression assertions for Picnic Day dates (2025–2027) and verifies the old hardcoded date no longer returns a holiday. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
shailyJain12
approved these changes
Jul 24, 2026
rabin-dhamala
approved these changes
Jul 24, 2026
antonsuba-shiftcare
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
NT Picnic Day (
au_nt) is defined with a hardcoded date:Picnic Day is legislated as the first Monday of August. The hardcoded 4th only coincidentally matched reality in 2025 (4 Aug 2025 was the first Monday). It resolves incorrectly for:
This feeds ShiftCare's auto-populated public holidays → payroll/timesheets for all NT accounts. Reported via escalation DEV-30999 (account Being Mentors NT).
Fix
Compute the first Monday of August using
DateCalculatorFactory.day_of_month_calculator, mirroring the existingqld_queens_bday_octoberdefinition in the same file. Theyear >= 2025gate is preserved, so pre-2025 historical data is unchanged.Tests
Added regression assertions to
au.yaml(tests:block) and regeneratedtest/defs/test_defs_au.rb:The AU defs test passes (109 assertions, 0 failures). The 8 pre-existing suite failures are unrelated US/CA definition drift (identical count on the base branch).
Notes
holidays-april-16-2025(the branch the app'sGemfilepins), following PR Add ANZAC Day 2026 observed holiday for NSW (April 27) #13.au.yaml,au.rb,test/defs/test_defs_au.rb. Unrelatedrake generatechurn inREGIONS.rb/nz.rbwas excluded.