diff --git a/au.yaml b/au.yaml index a5657fe..9d8f566 100644 --- a/au.yaml +++ b/au.yaml @@ -107,6 +107,14 @@ months: regions: [au_act, au_nsw, au_sa, au_tas, au_nt, au_vic] week: 2 wday: 1 + year_ranges: + until: 2022 + - name: King's Birthday + regions: [au_act, au_nsw, au_sa, au_tas, au_nt, au_vic] + week: 2 + wday: 1 + year_ranges: + from: 2023 - name: Queen's Birthday regions: [au_qld] function: qld_queens_birthday_june(year) @@ -133,6 +141,14 @@ months: regions: [au_wa] week: -1 wday: 1 + year_ranges: + until: 2021 + - name: King's Birthday + regions: [au_wa] + week: -1 + wday: 1 + year_ranges: + from: 2022 - name: "Family & Community Day" regions: [au_act] week: -1 @@ -155,6 +171,14 @@ months: regions: [au_qld] function: qld_queens_bday_october(year) observed: to_monday_if_weekend(date) + year_ranges: + until: 2022 + - name: King's Birthday + regions: [au_qld] + function: qld_kings_bday_october(year) + observed: to_monday_if_weekend(date) + year_ranges: + from: 2023 - name: Royal Hobart Show regions: [au_tas_south] function: hobart_show_day(year) @@ -221,6 +245,17 @@ methods: else nil end + qld_kings_bday_october: + # http://www.justice.qld.gov.au/fair-and-safe-work/industrial-relations/public-holidays/dates + # celebrated twice in 2012 + # in october again from 2016 + arguments: year + ruby: | + if year >= 2023 + Holidays::Factory::DateCalculator.day_of_month_calculator.call(year, 10, 1, 1) + else + nil + end qld_queens_birthday_june: # http://www.justice.qld.gov.au/fair-and-safe-work/industrial-relations/public-holidays/dates # in june until 2015 @@ -347,15 +382,35 @@ tests: expect: name: 'Labour Day' - given: - date: ['2012-06-11', '2012-10-01', '2013-6-10', '2015-6-8', '2016-10-3'] + date: ['2012-06-11', '2012-10-01', '2013-6-10', '2015-6-8', '2016-10-3', '2022-10-03'] regions: ["au_qld"] expect: name: "Queen's Birthday" - given: - date: ['2014-09-29', '2015-09-28', '2016-09-26'] + date: ['2023-10-2'] + regions: ["au_qld"] + expect: + name: "King's Birthday" + - given: + date: ['2022-06-13'] + regions: ["au_act", "au_nsw", "au_sa", "au_tas", "au_nt", "au_vic"] + expect: + name: "Queen's Birthday" + - given: + date: ['2023-06-12'] + regions: ["au_act", "au_nsw", "au_sa", "au_tas", "au_nt", "au_vic"] + expect: + name: "King's Birthday" + - given: + date: ['2014-09-29', '2015-09-28', '2016-09-26', '2021-09-27'] regions: ["au_wa"] expect: name: "Queen's Birthday" + - given: + date: ['2022-09-26', '2023-09-25'] + regions: ["au_wa"] + expect: + name: "King's Birthday" - given: date: '2014-09-29' regions: ["au_act"]