Skip to content

Commit

Permalink
FIX: Tasmania doesn't observe New Years public holiday - just moves it
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlyons2 committed Feb 9, 2017
1 parent fb5fb58 commit 8d5b2ea
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions au.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ months:
function_modifier: 1
1:
- name: New Year's Day
regions: [au]
regions: [au_nsw, au_vic, au_act, au_sa, au_wa, au_nt, au_qld]
mday: 1
observed: to_monday_if_weekend(date)
- name: New Year's Day
regions: [au_tas]
mday: 1
function: to_monday_if_weekend(date)
- name: Australia Day
regions: [au]
mday: 26
Expand Down Expand Up @@ -378,8 +382,11 @@ tests: |
assert_equal "Christmas Day", Date.civil(2016, 12, 27).holidays(:au_nt, :observed)[0][:name]
# NEW YEAR'S DAY - observed on both 1st and 2nd of Jan for 2017
regions = [:au_qld, :au_nsw, :au_act, :au_vic, :au_tas, :au_sa, :au_wa, :au_nt]
regions = [:au_qld, :au_nsw, :au_act, :au_vic, :au_sa, :au_wa, :au_nt]
regions.each do |r|
assert_equal "New Year's Day", Date.civil(2017, 1, 1).holidays(r)[0][:name]
assert_equal "New Year's Day", Date.civil(2017, 1, 2).holidays(r, :observed)[0][:name]
end
end
# Tasmania is different
assert_equal [], Date.civil(2017,1,1).holidays(:au_tas)
assert_equal "New Year's Day", Date.civil(2017, 1, 2).holidays(:au_tas)[0][:name]

0 comments on commit 8d5b2ea

Please sign in to comment.