From 33225a5b85e55a59b86f301a929246a825680f79 Mon Sep 17 00:00:00 2001 From: Simon Victory Date: Thu, 25 Nov 2021 13:26:38 +1000 Subject: [PATCH 1/9] feat: add norfolk island --- data/countries/AU.yaml | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/data/countries/AU.yaml b/data/countries/AU.yaml index 408045ef3..76f0cf2bc 100644 --- a/data/countries/AU.yaml +++ b/data/countries/AU.yaml @@ -8,6 +8,7 @@ holidays: langs: - en zones: + - Pacific/Norfolk - Australia/Sydney - Australia/Lord_Howe - Antarctica/Macquarie @@ -74,6 +75,39 @@ holidays: name: en: Labour Day # @source https://www.legislation.nsw.gov.au/~/pdf/view/act/2010/115/whole + regions: + # @source https://www.legislation.gov.au/Details/C2021Q00011 + NF: + name: Norfolk Island + zones: + - Pacific/Norfolk + days: + 2nd monday in March: false + easter -1: false + monday after 05-27: false + 03-06 and if saturday,sunday then next monday: + substitute: true + name: + en: Foundation Day + type: public + 06-08 and if saturday,sunday then next monday: + substitute: true + name: + en: Anniversary (Bounty) Day + type: public + 2nd monday in June: + name: + en: Queen's Birthday + 1st monday in October: false + 2nd monday in October: + name: + en: Norfolk Island Agricultural Show + type: public + Wednesday before 12-01: + name: + en: Thanksgiving Day + type: public + # @source http://www.norfolkisland.gov.nf/sites/default/files/docs/NIRC/Gazettes/2021_07_09%20Gazette%20No.%2029.pdf NSW: name: New South Wales zones: @@ -246,4 +280,4 @@ holidays: name: en: Queen's Birthday note: Might be on a different day; is proclaimed by Governor - 1st monday in October: false + 1st monday in October: false \ No newline at end of file From 5c26872a1059a846737d41b9689ecf0bfe6edaee Mon Sep 17 00:00:00 2001 From: Simon Victory Date: Thu, 25 Nov 2021 13:41:04 +1000 Subject: [PATCH 2/9] fix: point nf.todo to au.yaml --- data/countries/AU.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/countries/AU.yaml b/data/countries/AU.yaml index 76f0cf2bc..f678eccaf 100644 --- a/data/countries/AU.yaml +++ b/data/countries/AU.yaml @@ -76,7 +76,7 @@ holidays: en: Labour Day # @source https://www.legislation.nsw.gov.au/~/pdf/view/act/2010/115/whole regions: - # @source https://www.legislation.gov.au/Details/C2021Q00011 + # @source https://www.legislation.gov.au/Details/C2021Q00011 Part 1 NF: name: Norfolk Island zones: From 645fca792f26d6f38ec2084de254c1e3f6367555 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 25 Nov 2021 13:47:43 +1000 Subject: [PATCH 3/9] fix: section for NF --- data/countries/AU.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/countries/AU.yaml b/data/countries/AU.yaml index f678eccaf..ea46faa9d 100644 --- a/data/countries/AU.yaml +++ b/data/countries/AU.yaml @@ -76,7 +76,7 @@ holidays: en: Labour Day # @source https://www.legislation.nsw.gov.au/~/pdf/view/act/2010/115/whole regions: - # @source https://www.legislation.gov.au/Details/C2021Q00011 Part 1 + # @source https://www.legislation.gov.au/Details/C2021Q00011 Section 9 NF: name: Norfolk Island zones: From 079561128c6b28e37d7c5a37421827ce82b4bd5a Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 25 Nov 2021 13:48:27 +1000 Subject: [PATCH 4/9] fix: redirect NF.todo --- data/countries/NF.todo | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/data/countries/NF.todo b/data/countries/NF.todo index 00d1884e7..28fea8a08 100644 --- a/data/countries/NF.todo +++ b/data/countries/NF.todo @@ -1,9 +1 @@ -holidays: - NF: - names: - en: Norfolk Island - langs: [] - zones: - - Pacific/Norfolk - dayoff: '' - days: {} +# @see "au.act.nf" \ No newline at end of file From 1d087144f4c703d02fc05ba227308708e9cf1783 Mon Sep 17 00:00:00 2001 From: Simon Victory Date: Thu, 25 Nov 2021 14:56:40 +1000 Subject: [PATCH 5/9] fix: add AU-ACT-NF fixtures --- test/fixtures/AU-ACT-NF-2021.json | 139 ++++++++++++++++++++++++++++++ test/fixtures/AU-ACT-NF-2022.json | 138 +++++++++++++++++++++++++++++ test/fixtures/AU-ACT-NF-2023.json | 128 +++++++++++++++++++++++++++ test/fixtures/AU-ACT-NF-2024.json | 119 +++++++++++++++++++++++++ test/fixtures/AU-ACT-NF-2025.json | 119 +++++++++++++++++++++++++ 5 files changed, 643 insertions(+) create mode 100644 test/fixtures/AU-ACT-NF-2021.json create mode 100644 test/fixtures/AU-ACT-NF-2022.json create mode 100644 test/fixtures/AU-ACT-NF-2023.json create mode 100644 test/fixtures/AU-ACT-NF-2024.json create mode 100644 test/fixtures/AU-ACT-NF-2025.json diff --git a/test/fixtures/AU-ACT-NF-2021.json b/test/fixtures/AU-ACT-NF-2021.json new file mode 100644 index 000000000..0bbba69a1 --- /dev/null +++ b/test/fixtures/AU-ACT-NF-2021.json @@ -0,0 +1,139 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T13:00:00.000Z", + "end": "2021-01-01T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2021-01-26 00:00:00", + "start": "2021-01-25T13:00:00.000Z", + "end": "2021-01-26T13:00:00.000Z", + "name": "Australia Day", + "type": "public", + "rule": "01-26 if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2021-03-08 00:00:00", + "start": "2021-03-07T13:00:00.000Z", + "end": "2021-03-08T13:00:00.000Z", + "name": "Canberra Day", + "type": "public", + "rule": "2nd monday in March", + "_weekday": "Mon" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T13:00:00.000Z", + "end": "2021-04-02T13:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-03 00:00:00", + "start": "2021-04-02T13:00:00.000Z", + "end": "2021-04-03T13:00:00.000Z", + "name": "Easter Saturday", + "type": "public", + "rule": "easter -1", + "_weekday": "Sat" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T13:00:00.000Z", + "end": "2021-04-04T14:00:00.000Z", + "name": "Easter Sunday", + "type": "public", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-04-05 00:00:00", + "start": "2021-04-04T14:00:00.000Z", + "end": "2021-04-05T14:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2021-04-26 00:00:00", + "start": "2021-04-25T14:00:00.000Z", + "end": "2021-04-26T14:00:00.000Z", + "name": "Anzac Day", + "type": "public", + "rule": "04-25 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T14:00:00.000Z", + "end": "2021-05-31T14:00:00.000Z", + "name": "Reconciliation Day", + "type": "public", + "rule": "monday after 05-27", + "_weekday": "Mon" + }, + { + "date": "2021-06-14 00:00:00", + "start": "2021-06-13T14:00:00.000Z", + "end": "2021-06-14T14:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "2nd monday in June", + "_weekday": "Mon" + }, + { + "date": "2021-10-04 00:00:00", + "start": "2021-10-03T13:00:00.000Z", + "end": "2021-10-04T13:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "1st monday in October", + "_weekday": "Mon" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T13:00:00.000Z", + "end": "2021-12-25T13:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2021-12-26 00:00:00", + "start": "2021-12-25T13:00:00.000Z", + "end": "2021-12-26T13:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2021-12-27 00:00:00", + "start": "2021-12-26T13:00:00.000Z", + "end": "2021-12-27T13:00:00.000Z", + "name": "Christmas Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2021-12-28 00:00:00", + "start": "2021-12-27T13:00:00.000Z", + "end": "2021-12-28T13:00:00.000Z", + "name": "Boxing Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/AU-ACT-NF-2022.json b/test/fixtures/AU-ACT-NF-2022.json new file mode 100644 index 000000000..2080564eb --- /dev/null +++ b/test/fixtures/AU-ACT-NF-2022.json @@ -0,0 +1,138 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T13:00:00.000Z", + "end": "2022-01-01T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2022-01-03 00:00:00", + "start": "2022-01-02T13:00:00.000Z", + "end": "2022-01-03T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-01-26 00:00:00", + "start": "2022-01-25T13:00:00.000Z", + "end": "2022-01-26T13:00:00.000Z", + "name": "Australia Day", + "type": "public", + "rule": "01-26 if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2022-03-14 00:00:00", + "start": "2022-03-13T13:00:00.000Z", + "end": "2022-03-14T13:00:00.000Z", + "name": "Canberra Day", + "type": "public", + "rule": "2nd monday in March", + "_weekday": "Mon" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T14:00:00.000Z", + "end": "2022-04-15T14:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-16 00:00:00", + "start": "2022-04-15T14:00:00.000Z", + "end": "2022-04-16T14:00:00.000Z", + "name": "Easter Saturday", + "type": "public", + "rule": "easter -1", + "_weekday": "Sat" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T14:00:00.000Z", + "end": "2022-04-17T14:00:00.000Z", + "name": "Easter Sunday", + "type": "public", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-04-18 00:00:00", + "start": "2022-04-17T14:00:00.000Z", + "end": "2022-04-18T14:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2022-04-25 00:00:00", + "start": "2022-04-24T14:00:00.000Z", + "end": "2022-04-25T14:00:00.000Z", + "name": "Anzac Day", + "type": "public", + "rule": "04-25 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-05-30 00:00:00", + "start": "2022-05-29T14:00:00.000Z", + "end": "2022-05-30T14:00:00.000Z", + "name": "Reconciliation Day", + "type": "public", + "rule": "monday after 05-27", + "_weekday": "Mon" + }, + { + "date": "2022-06-13 00:00:00", + "start": "2022-06-12T14:00:00.000Z", + "end": "2022-06-13T14:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "2nd monday in June", + "_weekday": "Mon" + }, + { + "date": "2022-10-03 00:00:00", + "start": "2022-10-02T13:00:00.000Z", + "end": "2022-10-03T13:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "1st monday in October", + "_weekday": "Mon" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T13:00:00.000Z", + "end": "2022-12-25T13:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T13:00:00.000Z", + "end": "2022-12-26T13:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2022-12-27 00:00:00", + "start": "2022-12-26T13:00:00.000Z", + "end": "2022-12-27T13:00:00.000Z", + "name": "Christmas Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/AU-ACT-NF-2023.json b/test/fixtures/AU-ACT-NF-2023.json new file mode 100644 index 000000000..7335fb7fc --- /dev/null +++ b/test/fixtures/AU-ACT-NF-2023.json @@ -0,0 +1,128 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T13:00:00.000Z", + "end": "2023-01-01T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T13:00:00.000Z", + "end": "2023-01-02T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-01-26 00:00:00", + "start": "2023-01-25T13:00:00.000Z", + "end": "2023-01-26T13:00:00.000Z", + "name": "Australia Day", + "type": "public", + "rule": "01-26 if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2023-03-13 00:00:00", + "start": "2023-03-12T13:00:00.000Z", + "end": "2023-03-13T13:00:00.000Z", + "name": "Canberra Day", + "type": "public", + "rule": "2nd monday in March", + "_weekday": "Mon" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T14:00:00.000Z", + "end": "2023-04-07T14:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-08 00:00:00", + "start": "2023-04-07T14:00:00.000Z", + "end": "2023-04-08T14:00:00.000Z", + "name": "Easter Saturday", + "type": "public", + "rule": "easter -1", + "_weekday": "Sat" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T14:00:00.000Z", + "end": "2023-04-09T14:00:00.000Z", + "name": "Easter Sunday", + "type": "public", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-04-10 00:00:00", + "start": "2023-04-09T14:00:00.000Z", + "end": "2023-04-10T14:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2023-04-25 00:00:00", + "start": "2023-04-24T14:00:00.000Z", + "end": "2023-04-25T14:00:00.000Z", + "name": "Anzac Day", + "type": "public", + "rule": "04-25 if sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2023-05-29 00:00:00", + "start": "2023-05-28T14:00:00.000Z", + "end": "2023-05-29T14:00:00.000Z", + "name": "Reconciliation Day", + "type": "public", + "rule": "monday after 05-27", + "_weekday": "Mon" + }, + { + "date": "2023-06-12 00:00:00", + "start": "2023-06-11T14:00:00.000Z", + "end": "2023-06-12T14:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "2nd monday in June", + "_weekday": "Mon" + }, + { + "date": "2023-10-02 00:00:00", + "start": "2023-10-01T13:00:00.000Z", + "end": "2023-10-02T13:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "1st monday in October", + "_weekday": "Mon" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T13:00:00.000Z", + "end": "2023-12-25T13:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2023-12-26 00:00:00", + "start": "2023-12-25T13:00:00.000Z", + "end": "2023-12-26T13:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/AU-ACT-NF-2024.json b/test/fixtures/AU-ACT-NF-2024.json new file mode 100644 index 000000000..54c9cca59 --- /dev/null +++ b/test/fixtures/AU-ACT-NF-2024.json @@ -0,0 +1,119 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T13:00:00.000Z", + "end": "2024-01-01T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2024-01-26 00:00:00", + "start": "2024-01-25T13:00:00.000Z", + "end": "2024-01-26T13:00:00.000Z", + "name": "Australia Day", + "type": "public", + "rule": "01-26 if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2024-03-11 00:00:00", + "start": "2024-03-10T13:00:00.000Z", + "end": "2024-03-11T13:00:00.000Z", + "name": "Canberra Day", + "type": "public", + "rule": "2nd monday in March", + "_weekday": "Mon" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T13:00:00.000Z", + "end": "2024-03-29T13:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-30 00:00:00", + "start": "2024-03-29T13:00:00.000Z", + "end": "2024-03-30T13:00:00.000Z", + "name": "Easter Saturday", + "type": "public", + "rule": "easter -1", + "_weekday": "Sat" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T13:00:00.000Z", + "end": "2024-03-31T13:00:00.000Z", + "name": "Easter Sunday", + "type": "public", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-04-01 00:00:00", + "start": "2024-03-31T13:00:00.000Z", + "end": "2024-04-01T13:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2024-04-25 00:00:00", + "start": "2024-04-24T14:00:00.000Z", + "end": "2024-04-25T14:00:00.000Z", + "name": "Anzac Day", + "type": "public", + "rule": "04-25 if sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2024-05-27 00:00:00", + "start": "2024-05-26T14:00:00.000Z", + "end": "2024-05-27T14:00:00.000Z", + "name": "Reconciliation Day", + "type": "public", + "rule": "monday after 05-27", + "_weekday": "Mon" + }, + { + "date": "2024-06-10 00:00:00", + "start": "2024-06-09T14:00:00.000Z", + "end": "2024-06-10T14:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "2nd monday in June", + "_weekday": "Mon" + }, + { + "date": "2024-10-07 00:00:00", + "start": "2024-10-06T13:00:00.000Z", + "end": "2024-10-07T13:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "1st monday in October", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T13:00:00.000Z", + "end": "2024-12-25T13:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2024-12-26 00:00:00", + "start": "2024-12-25T13:00:00.000Z", + "end": "2024-12-26T13:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/AU-ACT-NF-2025.json b/test/fixtures/AU-ACT-NF-2025.json new file mode 100644 index 000000000..2846eb300 --- /dev/null +++ b/test/fixtures/AU-ACT-NF-2025.json @@ -0,0 +1,119 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T13:00:00.000Z", + "end": "2025-01-01T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2025-01-27 00:00:00", + "start": "2025-01-26T13:00:00.000Z", + "end": "2025-01-27T13:00:00.000Z", + "name": "Australia Day", + "type": "public", + "rule": "01-26 if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2025-03-10 00:00:00", + "start": "2025-03-09T13:00:00.000Z", + "end": "2025-03-10T13:00:00.000Z", + "name": "Canberra Day", + "type": "public", + "rule": "2nd monday in March", + "_weekday": "Mon" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T14:00:00.000Z", + "end": "2025-04-18T14:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-19 00:00:00", + "start": "2025-04-18T14:00:00.000Z", + "end": "2025-04-19T14:00:00.000Z", + "name": "Easter Saturday", + "type": "public", + "rule": "easter -1", + "_weekday": "Sat" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T14:00:00.000Z", + "end": "2025-04-20T14:00:00.000Z", + "name": "Easter Sunday", + "type": "public", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-04-21 00:00:00", + "start": "2025-04-20T14:00:00.000Z", + "end": "2025-04-21T14:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2025-04-25 00:00:00", + "start": "2025-04-24T14:00:00.000Z", + "end": "2025-04-25T14:00:00.000Z", + "name": "Anzac Day", + "type": "public", + "rule": "04-25 if sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2025-06-02 00:00:00", + "start": "2025-06-01T14:00:00.000Z", + "end": "2025-06-02T14:00:00.000Z", + "name": "Reconciliation Day", + "type": "public", + "rule": "monday after 05-27", + "_weekday": "Mon" + }, + { + "date": "2025-06-09 00:00:00", + "start": "2025-06-08T14:00:00.000Z", + "end": "2025-06-09T14:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "2nd monday in June", + "_weekday": "Mon" + }, + { + "date": "2025-10-06 00:00:00", + "start": "2025-10-05T13:00:00.000Z", + "end": "2025-10-06T13:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "1st monday in October", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T13:00:00.000Z", + "end": "2025-12-25T13:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2025-12-26 00:00:00", + "start": "2025-12-25T13:00:00.000Z", + "end": "2025-12-26T13:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + } +] \ No newline at end of file From 8c36770ec75d7610952a1120239c4107aa02e9a1 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 2 Dec 2021 20:21:54 +1000 Subject: [PATCH 6/9] refactor: play around with NF 2020 --- data/countries/AU.yaml | 19 ++-- test/fixtures/AU-ACT-NF-2020.json | 120 ++++++++++++++++++++++++++ test/fixtures/AU-ACT-NF-2021.json | 139 ------------------------------ test/fixtures/AU-ACT-NF-2022.json | 138 ----------------------------- test/fixtures/AU-ACT-NF-2023.json | 128 --------------------------- test/fixtures/AU-ACT-NF-2025.json | 119 ------------------------- 6 files changed, 133 insertions(+), 530 deletions(-) create mode 100644 test/fixtures/AU-ACT-NF-2020.json delete mode 100644 test/fixtures/AU-ACT-NF-2021.json delete mode 100644 test/fixtures/AU-ACT-NF-2022.json delete mode 100644 test/fixtures/AU-ACT-NF-2023.json delete mode 100644 test/fixtures/AU-ACT-NF-2025.json diff --git a/data/countries/AU.yaml b/data/countries/AU.yaml index ea46faa9d..700fada60 100644 --- a/data/countries/AU.yaml +++ b/data/countries/AU.yaml @@ -74,7 +74,7 @@ holidays: 1st monday in October: name: en: Labour Day - # @source https://www.legislation.nsw.gov.au/~/pdf/view/act/2010/115/whole + # @source https://www.legislation.nsw.gov.au/~/pdf/view/act/2010/115/whole regions: # @source https://www.legislation.gov.au/Details/C2021Q00011 Section 9 NF: @@ -83,22 +83,29 @@ holidays: - Pacific/Norfolk days: 2nd monday in March: false - easter -1: false - monday after 05-27: false 03-06 and if saturday,sunday then next monday: substitute: true name: en: Foundation Day type: public + 04-25 if sunday then next monday: false + "2020-04-27": false + 04-25: + name: + en: Anzac Day + easter -1: false + monday after 05-27: false 06-08 and if saturday,sunday then next monday: substitute: true name: en: Anniversary (Bounty) Day type: public - 2nd monday in June: + # 2nd monday in June: false + 3rd monday in June if 2nd monday in June is holiday: + substitute: true name: en: Queen's Birthday - 1st monday in October: false + 1st monday in October: false 2nd monday in October: name: en: Norfolk Island Agricultural Show @@ -280,4 +287,4 @@ holidays: name: en: Queen's Birthday note: Might be on a different day; is proclaimed by Governor - 1st monday in October: false \ No newline at end of file + 1st monday in October: false diff --git a/test/fixtures/AU-ACT-NF-2020.json b/test/fixtures/AU-ACT-NF-2020.json new file mode 100644 index 000000000..dedffc1e9 --- /dev/null +++ b/test/fixtures/AU-ACT-NF-2020.json @@ -0,0 +1,120 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T13:00:00.000Z", + "end": "2020-01-01T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2020-01-27 00:00:00", + "start": "2020-01-26T13:00:00.000Z", + "end": "2020-01-27T13:00:00.000Z", + "name": "Australia Day", + "type": "public", + "rule": "01-26 if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-03-06 00:00:00", + "start": "2020-03-05T13:00:00.000Z", + "end": "2020-03-06T13:00:00.000Z", + "name": "Foundation Day", + "type": "public", + "rule": "03-06 and if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T14:00:00.000Z", + "end": "2020-04-10T14:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T14:00:00.000Z", + "end": "2020-04-12T14:00:00.000Z", + "name": "Easter Sunday", + "type": "public", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-04-13 00:00:00", + "start": "2020-04-12T14:00:00.000Z", + "end": "2020-04-13T14:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2020-04-25 00:00:00", + "start": "2020-04-24T14:00:00.000Z", + "end": "2020-04-25T14:00:00.000Z", + "name": "Anzac Day", + "type": "public", + "rule": "04-25", + "_weekday": "Sat" + }, + { + "date": "2020-06-08 00:00:00", + "start": "2020-06-07T14:00:00.000Z", + "end": "2020-06-08T14:00:00.000Z", + "name": "Anniversary (Bounty) Day", + "type": "public", + "rule": "06-08 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-10-12 00:00:00", + "start": "2020-10-11T13:00:00.000Z", + "end": "2020-10-12T13:00:00.000Z", + "name": "Norfolk Island Agricultural Show", + "type": "public", + "rule": "2nd monday in October", + "_weekday": "Mon" + }, + { + "date": "2020-11-25 00:00:00", + "start": "2020-11-24T13:00:00.000Z", + "end": "2020-11-25T13:00:00.000Z", + "name": "Thanksgiving Day", + "type": "public", + "rule": "Wednesday before 12-01", + "_weekday": "Wed" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T13:00:00.000Z", + "end": "2020-12-25T13:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2020-12-26 00:00:00", + "start": "2020-12-25T13:00:00.000Z", + "end": "2020-12-26T13:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2020-12-28 00:00:00", + "start": "2020-12-27T13:00:00.000Z", + "end": "2020-12-28T13:00:00.000Z", + "name": "Boxing Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/AU-ACT-NF-2021.json b/test/fixtures/AU-ACT-NF-2021.json deleted file mode 100644 index 0bbba69a1..000000000 --- a/test/fixtures/AU-ACT-NF-2021.json +++ /dev/null @@ -1,139 +0,0 @@ -[ - { - "date": "2021-01-01 00:00:00", - "start": "2020-12-31T13:00:00.000Z", - "end": "2021-01-01T13:00:00.000Z", - "name": "New Year's Day", - "type": "public", - "rule": "01-01 and if saturday,sunday then next monday", - "_weekday": "Fri" - }, - { - "date": "2021-01-26 00:00:00", - "start": "2021-01-25T13:00:00.000Z", - "end": "2021-01-26T13:00:00.000Z", - "name": "Australia Day", - "type": "public", - "rule": "01-26 if saturday,sunday then next monday", - "_weekday": "Tue" - }, - { - "date": "2021-03-08 00:00:00", - "start": "2021-03-07T13:00:00.000Z", - "end": "2021-03-08T13:00:00.000Z", - "name": "Canberra Day", - "type": "public", - "rule": "2nd monday in March", - "_weekday": "Mon" - }, - { - "date": "2021-04-02 00:00:00", - "start": "2021-04-01T13:00:00.000Z", - "end": "2021-04-02T13:00:00.000Z", - "name": "Good Friday", - "type": "public", - "rule": "easter -2", - "_weekday": "Fri" - }, - { - "date": "2021-04-03 00:00:00", - "start": "2021-04-02T13:00:00.000Z", - "end": "2021-04-03T13:00:00.000Z", - "name": "Easter Saturday", - "type": "public", - "rule": "easter -1", - "_weekday": "Sat" - }, - { - "date": "2021-04-04 00:00:00", - "start": "2021-04-03T13:00:00.000Z", - "end": "2021-04-04T14:00:00.000Z", - "name": "Easter Sunday", - "type": "public", - "rule": "easter", - "_weekday": "Sun" - }, - { - "date": "2021-04-05 00:00:00", - "start": "2021-04-04T14:00:00.000Z", - "end": "2021-04-05T14:00:00.000Z", - "name": "Easter Monday", - "type": "public", - "rule": "easter 1", - "_weekday": "Mon" - }, - { - "date": "2021-04-26 00:00:00", - "start": "2021-04-25T14:00:00.000Z", - "end": "2021-04-26T14:00:00.000Z", - "name": "Anzac Day", - "type": "public", - "rule": "04-25 if sunday then next monday", - "_weekday": "Mon" - }, - { - "date": "2021-05-31 00:00:00", - "start": "2021-05-30T14:00:00.000Z", - "end": "2021-05-31T14:00:00.000Z", - "name": "Reconciliation Day", - "type": "public", - "rule": "monday after 05-27", - "_weekday": "Mon" - }, - { - "date": "2021-06-14 00:00:00", - "start": "2021-06-13T14:00:00.000Z", - "end": "2021-06-14T14:00:00.000Z", - "name": "Queen's Birthday", - "type": "public", - "rule": "2nd monday in June", - "_weekday": "Mon" - }, - { - "date": "2021-10-04 00:00:00", - "start": "2021-10-03T13:00:00.000Z", - "end": "2021-10-04T13:00:00.000Z", - "name": "Labour Day", - "type": "public", - "rule": "1st monday in October", - "_weekday": "Mon" - }, - { - "date": "2021-12-25 00:00:00", - "start": "2021-12-24T13:00:00.000Z", - "end": "2021-12-25T13:00:00.000Z", - "name": "Christmas Day", - "type": "public", - "rule": "12-25 and if saturday then next monday if sunday then next tuesday", - "_weekday": "Sat" - }, - { - "date": "2021-12-26 00:00:00", - "start": "2021-12-25T13:00:00.000Z", - "end": "2021-12-26T13:00:00.000Z", - "name": "Boxing Day", - "type": "public", - "rule": "12-26 and if saturday then next monday if sunday then next tuesday", - "_weekday": "Sun" - }, - { - "date": "2021-12-27 00:00:00", - "start": "2021-12-26T13:00:00.000Z", - "end": "2021-12-27T13:00:00.000Z", - "name": "Christmas Day (substitute day)", - "type": "public", - "substitute": true, - "rule": "12-25 and if saturday then next monday if sunday then next tuesday", - "_weekday": "Mon" - }, - { - "date": "2021-12-28 00:00:00", - "start": "2021-12-27T13:00:00.000Z", - "end": "2021-12-28T13:00:00.000Z", - "name": "Boxing Day (substitute day)", - "type": "public", - "substitute": true, - "rule": "12-26 and if saturday then next monday if sunday then next tuesday", - "_weekday": "Tue" - } -] \ No newline at end of file diff --git a/test/fixtures/AU-ACT-NF-2022.json b/test/fixtures/AU-ACT-NF-2022.json deleted file mode 100644 index 2080564eb..000000000 --- a/test/fixtures/AU-ACT-NF-2022.json +++ /dev/null @@ -1,138 +0,0 @@ -[ - { - "date": "2022-01-01 00:00:00", - "start": "2021-12-31T13:00:00.000Z", - "end": "2022-01-01T13:00:00.000Z", - "name": "New Year's Day", - "type": "public", - "rule": "01-01 and if saturday,sunday then next monday", - "_weekday": "Sat" - }, - { - "date": "2022-01-03 00:00:00", - "start": "2022-01-02T13:00:00.000Z", - "end": "2022-01-03T13:00:00.000Z", - "name": "New Year's Day", - "type": "public", - "rule": "01-01 and if saturday,sunday then next monday", - "_weekday": "Mon" - }, - { - "date": "2022-01-26 00:00:00", - "start": "2022-01-25T13:00:00.000Z", - "end": "2022-01-26T13:00:00.000Z", - "name": "Australia Day", - "type": "public", - "rule": "01-26 if saturday,sunday then next monday", - "_weekday": "Wed" - }, - { - "date": "2022-03-14 00:00:00", - "start": "2022-03-13T13:00:00.000Z", - "end": "2022-03-14T13:00:00.000Z", - "name": "Canberra Day", - "type": "public", - "rule": "2nd monday in March", - "_weekday": "Mon" - }, - { - "date": "2022-04-15 00:00:00", - "start": "2022-04-14T14:00:00.000Z", - "end": "2022-04-15T14:00:00.000Z", - "name": "Good Friday", - "type": "public", - "rule": "easter -2", - "_weekday": "Fri" - }, - { - "date": "2022-04-16 00:00:00", - "start": "2022-04-15T14:00:00.000Z", - "end": "2022-04-16T14:00:00.000Z", - "name": "Easter Saturday", - "type": "public", - "rule": "easter -1", - "_weekday": "Sat" - }, - { - "date": "2022-04-17 00:00:00", - "start": "2022-04-16T14:00:00.000Z", - "end": "2022-04-17T14:00:00.000Z", - "name": "Easter Sunday", - "type": "public", - "rule": "easter", - "_weekday": "Sun" - }, - { - "date": "2022-04-18 00:00:00", - "start": "2022-04-17T14:00:00.000Z", - "end": "2022-04-18T14:00:00.000Z", - "name": "Easter Monday", - "type": "public", - "rule": "easter 1", - "_weekday": "Mon" - }, - { - "date": "2022-04-25 00:00:00", - "start": "2022-04-24T14:00:00.000Z", - "end": "2022-04-25T14:00:00.000Z", - "name": "Anzac Day", - "type": "public", - "rule": "04-25 if sunday then next monday", - "_weekday": "Mon" - }, - { - "date": "2022-05-30 00:00:00", - "start": "2022-05-29T14:00:00.000Z", - "end": "2022-05-30T14:00:00.000Z", - "name": "Reconciliation Day", - "type": "public", - "rule": "monday after 05-27", - "_weekday": "Mon" - }, - { - "date": "2022-06-13 00:00:00", - "start": "2022-06-12T14:00:00.000Z", - "end": "2022-06-13T14:00:00.000Z", - "name": "Queen's Birthday", - "type": "public", - "rule": "2nd monday in June", - "_weekday": "Mon" - }, - { - "date": "2022-10-03 00:00:00", - "start": "2022-10-02T13:00:00.000Z", - "end": "2022-10-03T13:00:00.000Z", - "name": "Labour Day", - "type": "public", - "rule": "1st monday in October", - "_weekday": "Mon" - }, - { - "date": "2022-12-25 00:00:00", - "start": "2022-12-24T13:00:00.000Z", - "end": "2022-12-25T13:00:00.000Z", - "name": "Christmas Day", - "type": "public", - "rule": "12-25 and if saturday then next monday if sunday then next tuesday", - "_weekday": "Sun" - }, - { - "date": "2022-12-26 00:00:00", - "start": "2022-12-25T13:00:00.000Z", - "end": "2022-12-26T13:00:00.000Z", - "name": "Boxing Day", - "type": "public", - "rule": "12-26 and if saturday then next monday if sunday then next tuesday", - "_weekday": "Mon" - }, - { - "date": "2022-12-27 00:00:00", - "start": "2022-12-26T13:00:00.000Z", - "end": "2022-12-27T13:00:00.000Z", - "name": "Christmas Day (substitute day)", - "type": "public", - "substitute": true, - "rule": "12-25 and if saturday then next monday if sunday then next tuesday", - "_weekday": "Tue" - } -] \ No newline at end of file diff --git a/test/fixtures/AU-ACT-NF-2023.json b/test/fixtures/AU-ACT-NF-2023.json deleted file mode 100644 index 7335fb7fc..000000000 --- a/test/fixtures/AU-ACT-NF-2023.json +++ /dev/null @@ -1,128 +0,0 @@ -[ - { - "date": "2023-01-01 00:00:00", - "start": "2022-12-31T13:00:00.000Z", - "end": "2023-01-01T13:00:00.000Z", - "name": "New Year's Day", - "type": "public", - "rule": "01-01 and if saturday,sunday then next monday", - "_weekday": "Sun" - }, - { - "date": "2023-01-02 00:00:00", - "start": "2023-01-01T13:00:00.000Z", - "end": "2023-01-02T13:00:00.000Z", - "name": "New Year's Day", - "type": "public", - "rule": "01-01 and if saturday,sunday then next monday", - "_weekday": "Mon" - }, - { - "date": "2023-01-26 00:00:00", - "start": "2023-01-25T13:00:00.000Z", - "end": "2023-01-26T13:00:00.000Z", - "name": "Australia Day", - "type": "public", - "rule": "01-26 if saturday,sunday then next monday", - "_weekday": "Thu" - }, - { - "date": "2023-03-13 00:00:00", - "start": "2023-03-12T13:00:00.000Z", - "end": "2023-03-13T13:00:00.000Z", - "name": "Canberra Day", - "type": "public", - "rule": "2nd monday in March", - "_weekday": "Mon" - }, - { - "date": "2023-04-07 00:00:00", - "start": "2023-04-06T14:00:00.000Z", - "end": "2023-04-07T14:00:00.000Z", - "name": "Good Friday", - "type": "public", - "rule": "easter -2", - "_weekday": "Fri" - }, - { - "date": "2023-04-08 00:00:00", - "start": "2023-04-07T14:00:00.000Z", - "end": "2023-04-08T14:00:00.000Z", - "name": "Easter Saturday", - "type": "public", - "rule": "easter -1", - "_weekday": "Sat" - }, - { - "date": "2023-04-09 00:00:00", - "start": "2023-04-08T14:00:00.000Z", - "end": "2023-04-09T14:00:00.000Z", - "name": "Easter Sunday", - "type": "public", - "rule": "easter", - "_weekday": "Sun" - }, - { - "date": "2023-04-10 00:00:00", - "start": "2023-04-09T14:00:00.000Z", - "end": "2023-04-10T14:00:00.000Z", - "name": "Easter Monday", - "type": "public", - "rule": "easter 1", - "_weekday": "Mon" - }, - { - "date": "2023-04-25 00:00:00", - "start": "2023-04-24T14:00:00.000Z", - "end": "2023-04-25T14:00:00.000Z", - "name": "Anzac Day", - "type": "public", - "rule": "04-25 if sunday then next monday", - "_weekday": "Tue" - }, - { - "date": "2023-05-29 00:00:00", - "start": "2023-05-28T14:00:00.000Z", - "end": "2023-05-29T14:00:00.000Z", - "name": "Reconciliation Day", - "type": "public", - "rule": "monday after 05-27", - "_weekday": "Mon" - }, - { - "date": "2023-06-12 00:00:00", - "start": "2023-06-11T14:00:00.000Z", - "end": "2023-06-12T14:00:00.000Z", - "name": "Queen's Birthday", - "type": "public", - "rule": "2nd monday in June", - "_weekday": "Mon" - }, - { - "date": "2023-10-02 00:00:00", - "start": "2023-10-01T13:00:00.000Z", - "end": "2023-10-02T13:00:00.000Z", - "name": "Labour Day", - "type": "public", - "rule": "1st monday in October", - "_weekday": "Mon" - }, - { - "date": "2023-12-25 00:00:00", - "start": "2023-12-24T13:00:00.000Z", - "end": "2023-12-25T13:00:00.000Z", - "name": "Christmas Day", - "type": "public", - "rule": "12-25 and if saturday then next monday if sunday then next tuesday", - "_weekday": "Mon" - }, - { - "date": "2023-12-26 00:00:00", - "start": "2023-12-25T13:00:00.000Z", - "end": "2023-12-26T13:00:00.000Z", - "name": "Boxing Day", - "type": "public", - "rule": "12-26 and if saturday then next monday if sunday then next tuesday", - "_weekday": "Tue" - } -] \ No newline at end of file diff --git a/test/fixtures/AU-ACT-NF-2025.json b/test/fixtures/AU-ACT-NF-2025.json deleted file mode 100644 index 2846eb300..000000000 --- a/test/fixtures/AU-ACT-NF-2025.json +++ /dev/null @@ -1,119 +0,0 @@ -[ - { - "date": "2025-01-01 00:00:00", - "start": "2024-12-31T13:00:00.000Z", - "end": "2025-01-01T13:00:00.000Z", - "name": "New Year's Day", - "type": "public", - "rule": "01-01 and if saturday,sunday then next monday", - "_weekday": "Wed" - }, - { - "date": "2025-01-27 00:00:00", - "start": "2025-01-26T13:00:00.000Z", - "end": "2025-01-27T13:00:00.000Z", - "name": "Australia Day", - "type": "public", - "rule": "01-26 if saturday,sunday then next monday", - "_weekday": "Mon" - }, - { - "date": "2025-03-10 00:00:00", - "start": "2025-03-09T13:00:00.000Z", - "end": "2025-03-10T13:00:00.000Z", - "name": "Canberra Day", - "type": "public", - "rule": "2nd monday in March", - "_weekday": "Mon" - }, - { - "date": "2025-04-18 00:00:00", - "start": "2025-04-17T14:00:00.000Z", - "end": "2025-04-18T14:00:00.000Z", - "name": "Good Friday", - "type": "public", - "rule": "easter -2", - "_weekday": "Fri" - }, - { - "date": "2025-04-19 00:00:00", - "start": "2025-04-18T14:00:00.000Z", - "end": "2025-04-19T14:00:00.000Z", - "name": "Easter Saturday", - "type": "public", - "rule": "easter -1", - "_weekday": "Sat" - }, - { - "date": "2025-04-20 00:00:00", - "start": "2025-04-19T14:00:00.000Z", - "end": "2025-04-20T14:00:00.000Z", - "name": "Easter Sunday", - "type": "public", - "rule": "easter", - "_weekday": "Sun" - }, - { - "date": "2025-04-21 00:00:00", - "start": "2025-04-20T14:00:00.000Z", - "end": "2025-04-21T14:00:00.000Z", - "name": "Easter Monday", - "type": "public", - "rule": "easter 1", - "_weekday": "Mon" - }, - { - "date": "2025-04-25 00:00:00", - "start": "2025-04-24T14:00:00.000Z", - "end": "2025-04-25T14:00:00.000Z", - "name": "Anzac Day", - "type": "public", - "rule": "04-25 if sunday then next monday", - "_weekday": "Fri" - }, - { - "date": "2025-06-02 00:00:00", - "start": "2025-06-01T14:00:00.000Z", - "end": "2025-06-02T14:00:00.000Z", - "name": "Reconciliation Day", - "type": "public", - "rule": "monday after 05-27", - "_weekday": "Mon" - }, - { - "date": "2025-06-09 00:00:00", - "start": "2025-06-08T14:00:00.000Z", - "end": "2025-06-09T14:00:00.000Z", - "name": "Queen's Birthday", - "type": "public", - "rule": "2nd monday in June", - "_weekday": "Mon" - }, - { - "date": "2025-10-06 00:00:00", - "start": "2025-10-05T13:00:00.000Z", - "end": "2025-10-06T13:00:00.000Z", - "name": "Labour Day", - "type": "public", - "rule": "1st monday in October", - "_weekday": "Mon" - }, - { - "date": "2025-12-25 00:00:00", - "start": "2025-12-24T13:00:00.000Z", - "end": "2025-12-25T13:00:00.000Z", - "name": "Christmas Day", - "type": "public", - "rule": "12-25 and if saturday then next monday if sunday then next tuesday", - "_weekday": "Thu" - }, - { - "date": "2025-12-26 00:00:00", - "start": "2025-12-25T13:00:00.000Z", - "end": "2025-12-26T13:00:00.000Z", - "name": "Boxing Day", - "type": "public", - "rule": "12-26 and if saturday then next monday if sunday then next tuesday", - "_weekday": "Fri" - } -] \ No newline at end of file From 4b93f9c79287ceafd78f97cd48e8e8e1e4a72d9e Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 5 Jan 2022 17:15:27 +1000 Subject: [PATCH 7/9] fix(AU.NL): move queen's birthday after bounty day --- data/countries/AU.yaml | 14 +++++++++----- package.json | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/data/countries/AU.yaml b/data/countries/AU.yaml index 95e6b1870..70b02bb83 100644 --- a/data/countries/AU.yaml +++ b/data/countries/AU.yaml @@ -90,10 +90,10 @@ holidays: days: 2nd monday in March: false 03-06 and if saturday,sunday then next monday: - substitute: true name: en: Foundation Day type: public + easter: false 04-25 if sunday then next monday: false "2020-04-27": false 04-25: @@ -101,13 +101,13 @@ holidays: en: Anzac Day easter -1: false monday after 05-27: false - 06-08 and if saturday,sunday then next monday: + 06-08 if saturday,sunday then next monday: substitute: true name: en: Anniversary (Bounty) Day type: public - # 2nd monday in June: false - 3rd monday in June if 2nd monday in June is holiday: + 2nd monday in June: false + monday after 2nd saturday in June if is public holiday then next monday: substitute: true name: en: Queen's Birthday @@ -120,7 +120,11 @@ holidays: name: en: Thanksgiving Day type: public - # @source http://www.norfolkisland.gov.nf/sites/default/files/docs/NIRC/Gazettes/2021_07_09%20Gazette%20No.%2029.pdf + # @source http://www.norfolkisland.gov.nf/sites/default/files/docs/NIRC/Gazettes/2017/2017_09_29%20Gazette%20No.%2099.pdf 2018 + # @source http://www.norfolkisland.gov.nf/sites/default/files/docs/NIRC/Gazettes/2018_06_29%20Gazette%20No.%2026.pdf 2019 + # @source http://www.norfolkisland.gov.nf/sites/default/files/docs/NIRC/Gazettes/2019_07_05%20Gazette%20No.%2030.pdf 2020 + # @source http://www.norfolkislander.com/images/2020_07_31_Gazette_No._35.pdf 2021 + # @source http://www.norfolkisland.gov.nf/sites/default/files/docs/NIRC/Gazettes/2021_07_09%20Gazette%20No.%2029.pdf 2022 NSW: name: New South Wales zones: diff --git a/package.json b/package.json index 0841098d9..be23de7eb 100644 --- a/package.json +++ b/package.json @@ -179,7 +179,7 @@ "reporter": "dot" }, "dependencies": { - "date-holidays-parser": "^3.2.3", + "date-holidays-parser": "^3.3.0-0", "js-yaml": "^4.1.0", "lodash.omit": "^4.5.0", "lodash.pick": "^4.4.0", From 9115d1eca6de5aed39d5edbd584eb1d733d3831c Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 6 Jan 2022 11:27:57 +1000 Subject: [PATCH 8/9] fix(AU): daylight savings, new queens bday rules --- test/fixtures/AU-2019.json | 36 ++++++++++----------- test/fixtures/AU-2020.json | 48 ++++++++++++++-------------- test/fixtures/AU-2021.json | 52 +++++++++++++++---------------- test/fixtures/AU-2022.json | 52 +++++++++++++++---------------- test/fixtures/AU-2023.json | 48 ++++++++++++++-------------- test/fixtures/AU-2024.json | 12 +++---- test/fixtures/AU-2025.json | 28 ++++++++--------- test/fixtures/AU-ACT-NF-2020.json | 38 ++++++++++++++++------ 8 files changed, 166 insertions(+), 148 deletions(-) diff --git a/test/fixtures/AU-2019.json b/test/fixtures/AU-2019.json index f1279842c..af603d039 100644 --- a/test/fixtures/AU-2019.json +++ b/test/fixtures/AU-2019.json @@ -19,8 +19,8 @@ }, { "date": "2019-04-19 00:00:00", - "start": "2019-04-18T14:00:00.000Z", - "end": "2019-04-19T14:00:00.000Z", + "start": "2019-04-18T13:00:00.000Z", + "end": "2019-04-19T13:00:00.000Z", "name": "Good Friday", "type": "public", "rule": "easter -2", @@ -28,8 +28,8 @@ }, { "date": "2019-04-20 00:00:00", - "start": "2019-04-19T14:00:00.000Z", - "end": "2019-04-20T14:00:00.000Z", + "start": "2019-04-19T13:00:00.000Z", + "end": "2019-04-20T13:00:00.000Z", "name": "Easter Saturday", "type": "public", "rule": "easter -1", @@ -37,8 +37,8 @@ }, { "date": "2019-04-21 00:00:00", - "start": "2019-04-20T14:00:00.000Z", - "end": "2019-04-21T14:00:00.000Z", + "start": "2019-04-20T13:00:00.000Z", + "end": "2019-04-21T13:00:00.000Z", "name": "Easter Sunday", "type": "public", "rule": "easter", @@ -46,8 +46,8 @@ }, { "date": "2019-04-22 00:00:00", - "start": "2019-04-21T14:00:00.000Z", - "end": "2019-04-22T14:00:00.000Z", + "start": "2019-04-21T13:00:00.000Z", + "end": "2019-04-22T13:00:00.000Z", "name": "Easter Monday", "type": "public", "rule": "easter 1", @@ -55,8 +55,8 @@ }, { "date": "2019-04-25 00:00:00", - "start": "2019-04-24T14:00:00.000Z", - "end": "2019-04-25T14:00:00.000Z", + "start": "2019-04-24T13:00:00.000Z", + "end": "2019-04-25T13:00:00.000Z", "name": "Anzac Day", "type": "public", "rule": "04-25", @@ -64,8 +64,8 @@ }, { "date": "2019-05-12 00:00:00", - "start": "2019-05-11T14:00:00.000Z", - "end": "2019-05-12T14:00:00.000Z", + "start": "2019-05-11T13:00:00.000Z", + "end": "2019-05-12T13:00:00.000Z", "name": "Mother's Day", "type": "observance", "rule": "2nd sunday in May", @@ -73,8 +73,8 @@ }, { "date": "2019-09-01 00:00:00", - "start": "2019-08-31T14:00:00.000Z", - "end": "2019-09-01T14:00:00.000Z", + "start": "2019-08-31T13:00:00.000Z", + "end": "2019-09-01T13:00:00.000Z", "name": "Father's Day", "type": "observance", "rule": "1st sunday in September", @@ -82,8 +82,8 @@ }, { "date": "2019-12-25 00:00:00", - "start": "2019-12-24T13:00:00.000Z", - "end": "2019-12-25T13:00:00.000Z", + "start": "2019-12-24T12:00:00.000Z", + "end": "2019-12-25T12:00:00.000Z", "name": "Christmas Day", "type": "public", "rule": "12-25 and if saturday then next monday if sunday then next tuesday", @@ -91,8 +91,8 @@ }, { "date": "2019-12-26 00:00:00", - "start": "2019-12-25T13:00:00.000Z", - "end": "2019-12-26T13:00:00.000Z", + "start": "2019-12-25T12:00:00.000Z", + "end": "2019-12-26T12:00:00.000Z", "name": "Boxing Day", "type": "public", "rule": "12-26 and if saturday then next monday if sunday then next tuesday", diff --git a/test/fixtures/AU-2020.json b/test/fixtures/AU-2020.json index 30061fd83..e88b33f48 100644 --- a/test/fixtures/AU-2020.json +++ b/test/fixtures/AU-2020.json @@ -1,8 +1,8 @@ [ { "date": "2020-01-01 00:00:00", - "start": "2019-12-31T13:00:00.000Z", - "end": "2020-01-01T13:00:00.000Z", + "start": "2019-12-31T12:00:00.000Z", + "end": "2020-01-01T12:00:00.000Z", "name": "New Year's Day", "type": "public", "rule": "01-01 and if saturday,sunday then next monday", @@ -10,8 +10,8 @@ }, { "date": "2020-01-27 00:00:00", - "start": "2020-01-26T13:00:00.000Z", - "end": "2020-01-27T13:00:00.000Z", + "start": "2020-01-26T12:00:00.000Z", + "end": "2020-01-27T12:00:00.000Z", "name": "Australia Day", "type": "public", "rule": "01-26 if saturday,sunday then next monday", @@ -19,8 +19,8 @@ }, { "date": "2020-04-10 00:00:00", - "start": "2020-04-09T14:00:00.000Z", - "end": "2020-04-10T14:00:00.000Z", + "start": "2020-04-09T13:00:00.000Z", + "end": "2020-04-10T13:00:00.000Z", "name": "Good Friday", "type": "public", "rule": "easter -2", @@ -28,8 +28,8 @@ }, { "date": "2020-04-11 00:00:00", - "start": "2020-04-10T14:00:00.000Z", - "end": "2020-04-11T14:00:00.000Z", + "start": "2020-04-10T13:00:00.000Z", + "end": "2020-04-11T13:00:00.000Z", "name": "Easter Saturday", "type": "public", "rule": "easter -1", @@ -37,8 +37,8 @@ }, { "date": "2020-04-12 00:00:00", - "start": "2020-04-11T14:00:00.000Z", - "end": "2020-04-12T14:00:00.000Z", + "start": "2020-04-11T13:00:00.000Z", + "end": "2020-04-12T13:00:00.000Z", "name": "Easter Sunday", "type": "public", "rule": "easter", @@ -46,8 +46,8 @@ }, { "date": "2020-04-13 00:00:00", - "start": "2020-04-12T14:00:00.000Z", - "end": "2020-04-13T14:00:00.000Z", + "start": "2020-04-12T13:00:00.000Z", + "end": "2020-04-13T13:00:00.000Z", "name": "Easter Monday", "type": "public", "rule": "easter 1", @@ -55,8 +55,8 @@ }, { "date": "2020-04-25 00:00:00", - "start": "2020-04-24T14:00:00.000Z", - "end": "2020-04-25T14:00:00.000Z", + "start": "2020-04-24T13:00:00.000Z", + "end": "2020-04-25T13:00:00.000Z", "name": "Anzac Day", "type": "public", "rule": "04-25", @@ -64,8 +64,8 @@ }, { "date": "2020-05-10 00:00:00", - "start": "2020-05-09T14:00:00.000Z", - "end": "2020-05-10T14:00:00.000Z", + "start": "2020-05-09T13:00:00.000Z", + "end": "2020-05-10T13:00:00.000Z", "name": "Mother's Day", "type": "observance", "rule": "2nd sunday in May", @@ -73,8 +73,8 @@ }, { "date": "2020-09-06 00:00:00", - "start": "2020-09-05T14:00:00.000Z", - "end": "2020-09-06T14:00:00.000Z", + "start": "2020-09-05T13:00:00.000Z", + "end": "2020-09-06T13:00:00.000Z", "name": "Father's Day", "type": "observance", "rule": "1st sunday in September", @@ -82,8 +82,8 @@ }, { "date": "2020-12-25 00:00:00", - "start": "2020-12-24T13:00:00.000Z", - "end": "2020-12-25T13:00:00.000Z", + "start": "2020-12-24T12:00:00.000Z", + "end": "2020-12-25T12:00:00.000Z", "name": "Christmas Day", "type": "public", "rule": "12-25 and if saturday then next monday if sunday then next tuesday", @@ -91,8 +91,8 @@ }, { "date": "2020-12-26 00:00:00", - "start": "2020-12-25T13:00:00.000Z", - "end": "2020-12-26T13:00:00.000Z", + "start": "2020-12-25T12:00:00.000Z", + "end": "2020-12-26T12:00:00.000Z", "name": "Boxing Day", "type": "public", "rule": "12-26 and if saturday then next monday if sunday then next tuesday", @@ -100,8 +100,8 @@ }, { "date": "2020-12-28 00:00:00", - "start": "2020-12-27T13:00:00.000Z", - "end": "2020-12-28T13:00:00.000Z", + "start": "2020-12-27T12:00:00.000Z", + "end": "2020-12-28T12:00:00.000Z", "name": "Boxing Day (substitute day)", "type": "public", "substitute": true, diff --git a/test/fixtures/AU-2021.json b/test/fixtures/AU-2021.json index 06c63864b..fd94c89e1 100644 --- a/test/fixtures/AU-2021.json +++ b/test/fixtures/AU-2021.json @@ -1,8 +1,8 @@ [ { "date": "2021-01-01 00:00:00", - "start": "2020-12-31T13:00:00.000Z", - "end": "2021-01-01T13:00:00.000Z", + "start": "2020-12-31T12:00:00.000Z", + "end": "2021-01-01T12:00:00.000Z", "name": "New Year's Day", "type": "public", "rule": "01-01 and if saturday,sunday then next monday", @@ -10,8 +10,8 @@ }, { "date": "2021-01-26 00:00:00", - "start": "2021-01-25T13:00:00.000Z", - "end": "2021-01-26T13:00:00.000Z", + "start": "2021-01-25T12:00:00.000Z", + "end": "2021-01-26T12:00:00.000Z", "name": "Australia Day", "type": "public", "rule": "01-26 if saturday,sunday then next monday", @@ -19,8 +19,8 @@ }, { "date": "2021-04-02 00:00:00", - "start": "2021-04-01T13:00:00.000Z", - "end": "2021-04-02T13:00:00.000Z", + "start": "2021-04-01T12:00:00.000Z", + "end": "2021-04-02T12:00:00.000Z", "name": "Good Friday", "type": "public", "rule": "easter -2", @@ -28,8 +28,8 @@ }, { "date": "2021-04-03 00:00:00", - "start": "2021-04-02T13:00:00.000Z", - "end": "2021-04-03T13:00:00.000Z", + "start": "2021-04-02T12:00:00.000Z", + "end": "2021-04-03T12:00:00.000Z", "name": "Easter Saturday", "type": "public", "rule": "easter -1", @@ -37,8 +37,8 @@ }, { "date": "2021-04-04 00:00:00", - "start": "2021-04-03T13:00:00.000Z", - "end": "2021-04-04T14:00:00.000Z", + "start": "2021-04-03T12:00:00.000Z", + "end": "2021-04-04T13:00:00.000Z", "name": "Easter Sunday", "type": "public", "rule": "easter", @@ -46,8 +46,8 @@ }, { "date": "2021-04-05 00:00:00", - "start": "2021-04-04T14:00:00.000Z", - "end": "2021-04-05T14:00:00.000Z", + "start": "2021-04-04T13:00:00.000Z", + "end": "2021-04-05T13:00:00.000Z", "name": "Easter Monday", "type": "public", "rule": "easter 1", @@ -55,8 +55,8 @@ }, { "date": "2021-04-25 00:00:00", - "start": "2021-04-24T14:00:00.000Z", - "end": "2021-04-25T14:00:00.000Z", + "start": "2021-04-24T13:00:00.000Z", + "end": "2021-04-25T13:00:00.000Z", "name": "Anzac Day", "type": "public", "rule": "04-25", @@ -64,8 +64,8 @@ }, { "date": "2021-05-09 00:00:00", - "start": "2021-05-08T14:00:00.000Z", - "end": "2021-05-09T14:00:00.000Z", + "start": "2021-05-08T13:00:00.000Z", + "end": "2021-05-09T13:00:00.000Z", "name": "Mother's Day", "type": "observance", "rule": "2nd sunday in May", @@ -73,8 +73,8 @@ }, { "date": "2021-09-05 00:00:00", - "start": "2021-09-04T14:00:00.000Z", - "end": "2021-09-05T14:00:00.000Z", + "start": "2021-09-04T13:00:00.000Z", + "end": "2021-09-05T13:00:00.000Z", "name": "Father's Day", "type": "observance", "rule": "1st sunday in September", @@ -82,8 +82,8 @@ }, { "date": "2021-12-25 00:00:00", - "start": "2021-12-24T13:00:00.000Z", - "end": "2021-12-25T13:00:00.000Z", + "start": "2021-12-24T12:00:00.000Z", + "end": "2021-12-25T12:00:00.000Z", "name": "Christmas Day", "type": "public", "rule": "12-25 and if saturday then next monday if sunday then next tuesday", @@ -91,8 +91,8 @@ }, { "date": "2021-12-26 00:00:00", - "start": "2021-12-25T13:00:00.000Z", - "end": "2021-12-26T13:00:00.000Z", + "start": "2021-12-25T12:00:00.000Z", + "end": "2021-12-26T12:00:00.000Z", "name": "Boxing Day", "type": "public", "rule": "12-26 and if saturday then next monday if sunday then next tuesday", @@ -100,8 +100,8 @@ }, { "date": "2021-12-27 00:00:00", - "start": "2021-12-26T13:00:00.000Z", - "end": "2021-12-27T13:00:00.000Z", + "start": "2021-12-26T12:00:00.000Z", + "end": "2021-12-27T12:00:00.000Z", "name": "Christmas Day (substitute day)", "type": "public", "substitute": true, @@ -110,8 +110,8 @@ }, { "date": "2021-12-28 00:00:00", - "start": "2021-12-27T13:00:00.000Z", - "end": "2021-12-28T13:00:00.000Z", + "start": "2021-12-27T12:00:00.000Z", + "end": "2021-12-28T12:00:00.000Z", "name": "Boxing Day (substitute day)", "type": "public", "substitute": true, diff --git a/test/fixtures/AU-2022.json b/test/fixtures/AU-2022.json index 45c728cec..653027958 100644 --- a/test/fixtures/AU-2022.json +++ b/test/fixtures/AU-2022.json @@ -1,8 +1,8 @@ [ { "date": "2022-01-01 00:00:00", - "start": "2021-12-31T13:00:00.000Z", - "end": "2022-01-01T13:00:00.000Z", + "start": "2021-12-31T12:00:00.000Z", + "end": "2022-01-01T12:00:00.000Z", "name": "New Year's Day", "type": "public", "rule": "01-01 and if saturday,sunday then next monday", @@ -10,8 +10,8 @@ }, { "date": "2022-01-03 00:00:00", - "start": "2022-01-02T13:00:00.000Z", - "end": "2022-01-03T13:00:00.000Z", + "start": "2022-01-02T12:00:00.000Z", + "end": "2022-01-03T12:00:00.000Z", "name": "New Year's Day", "type": "public", "rule": "01-01 and if saturday,sunday then next monday", @@ -19,8 +19,8 @@ }, { "date": "2022-01-26 00:00:00", - "start": "2022-01-25T13:00:00.000Z", - "end": "2022-01-26T13:00:00.000Z", + "start": "2022-01-25T12:00:00.000Z", + "end": "2022-01-26T12:00:00.000Z", "name": "Australia Day", "type": "public", "rule": "01-26 if saturday,sunday then next monday", @@ -28,8 +28,8 @@ }, { "date": "2022-04-15 00:00:00", - "start": "2022-04-14T14:00:00.000Z", - "end": "2022-04-15T14:00:00.000Z", + "start": "2022-04-14T13:00:00.000Z", + "end": "2022-04-15T13:00:00.000Z", "name": "Good Friday", "type": "public", "rule": "easter -2", @@ -37,8 +37,8 @@ }, { "date": "2022-04-16 00:00:00", - "start": "2022-04-15T14:00:00.000Z", - "end": "2022-04-16T14:00:00.000Z", + "start": "2022-04-15T13:00:00.000Z", + "end": "2022-04-16T13:00:00.000Z", "name": "Easter Saturday", "type": "public", "rule": "easter -1", @@ -46,8 +46,8 @@ }, { "date": "2022-04-17 00:00:00", - "start": "2022-04-16T14:00:00.000Z", - "end": "2022-04-17T14:00:00.000Z", + "start": "2022-04-16T13:00:00.000Z", + "end": "2022-04-17T13:00:00.000Z", "name": "Easter Sunday", "type": "public", "rule": "easter", @@ -55,8 +55,8 @@ }, { "date": "2022-04-18 00:00:00", - "start": "2022-04-17T14:00:00.000Z", - "end": "2022-04-18T14:00:00.000Z", + "start": "2022-04-17T13:00:00.000Z", + "end": "2022-04-18T13:00:00.000Z", "name": "Easter Monday", "type": "public", "rule": "easter 1", @@ -64,8 +64,8 @@ }, { "date": "2022-04-25 00:00:00", - "start": "2022-04-24T14:00:00.000Z", - "end": "2022-04-25T14:00:00.000Z", + "start": "2022-04-24T13:00:00.000Z", + "end": "2022-04-25T13:00:00.000Z", "name": "Anzac Day", "type": "public", "rule": "04-25", @@ -73,8 +73,8 @@ }, { "date": "2022-05-08 00:00:00", - "start": "2022-05-07T14:00:00.000Z", - "end": "2022-05-08T14:00:00.000Z", + "start": "2022-05-07T13:00:00.000Z", + "end": "2022-05-08T13:00:00.000Z", "name": "Mother's Day", "type": "observance", "rule": "2nd sunday in May", @@ -82,8 +82,8 @@ }, { "date": "2022-09-04 00:00:00", - "start": "2022-09-03T14:00:00.000Z", - "end": "2022-09-04T14:00:00.000Z", + "start": "2022-09-03T13:00:00.000Z", + "end": "2022-09-04T13:00:00.000Z", "name": "Father's Day", "type": "observance", "rule": "1st sunday in September", @@ -91,8 +91,8 @@ }, { "date": "2022-12-25 00:00:00", - "start": "2022-12-24T13:00:00.000Z", - "end": "2022-12-25T13:00:00.000Z", + "start": "2022-12-24T12:00:00.000Z", + "end": "2022-12-25T12:00:00.000Z", "name": "Christmas Day", "type": "public", "rule": "12-25 and if saturday then next monday if sunday then next tuesday", @@ -100,8 +100,8 @@ }, { "date": "2022-12-26 00:00:00", - "start": "2022-12-25T13:00:00.000Z", - "end": "2022-12-26T13:00:00.000Z", + "start": "2022-12-25T12:00:00.000Z", + "end": "2022-12-26T12:00:00.000Z", "name": "Boxing Day", "type": "public", "rule": "12-26 and if saturday then next monday if sunday then next tuesday", @@ -109,8 +109,8 @@ }, { "date": "2022-12-27 00:00:00", - "start": "2022-12-26T13:00:00.000Z", - "end": "2022-12-27T13:00:00.000Z", + "start": "2022-12-26T12:00:00.000Z", + "end": "2022-12-27T12:00:00.000Z", "name": "Christmas Day (substitute day)", "type": "public", "substitute": true, diff --git a/test/fixtures/AU-2023.json b/test/fixtures/AU-2023.json index f643033a8..90c4f4dfd 100644 --- a/test/fixtures/AU-2023.json +++ b/test/fixtures/AU-2023.json @@ -1,8 +1,8 @@ [ { "date": "2023-01-01 00:00:00", - "start": "2022-12-31T13:00:00.000Z", - "end": "2023-01-01T13:00:00.000Z", + "start": "2022-12-31T12:00:00.000Z", + "end": "2023-01-01T12:00:00.000Z", "name": "New Year's Day", "type": "public", "rule": "01-01 and if saturday,sunday then next monday", @@ -10,8 +10,8 @@ }, { "date": "2023-01-02 00:00:00", - "start": "2023-01-01T13:00:00.000Z", - "end": "2023-01-02T13:00:00.000Z", + "start": "2023-01-01T12:00:00.000Z", + "end": "2023-01-02T12:00:00.000Z", "name": "New Year's Day", "type": "public", "rule": "01-01 and if saturday,sunday then next monday", @@ -19,8 +19,8 @@ }, { "date": "2023-01-26 00:00:00", - "start": "2023-01-25T13:00:00.000Z", - "end": "2023-01-26T13:00:00.000Z", + "start": "2023-01-25T12:00:00.000Z", + "end": "2023-01-26T12:00:00.000Z", "name": "Australia Day", "type": "public", "rule": "01-26 if saturday,sunday then next monday", @@ -28,8 +28,8 @@ }, { "date": "2023-04-07 00:00:00", - "start": "2023-04-06T14:00:00.000Z", - "end": "2023-04-07T14:00:00.000Z", + "start": "2023-04-06T13:00:00.000Z", + "end": "2023-04-07T13:00:00.000Z", "name": "Good Friday", "type": "public", "rule": "easter -2", @@ -37,8 +37,8 @@ }, { "date": "2023-04-08 00:00:00", - "start": "2023-04-07T14:00:00.000Z", - "end": "2023-04-08T14:00:00.000Z", + "start": "2023-04-07T13:00:00.000Z", + "end": "2023-04-08T13:00:00.000Z", "name": "Easter Saturday", "type": "public", "rule": "easter -1", @@ -46,8 +46,8 @@ }, { "date": "2023-04-09 00:00:00", - "start": "2023-04-08T14:00:00.000Z", - "end": "2023-04-09T14:00:00.000Z", + "start": "2023-04-08T13:00:00.000Z", + "end": "2023-04-09T13:00:00.000Z", "name": "Easter Sunday", "type": "public", "rule": "easter", @@ -55,8 +55,8 @@ }, { "date": "2023-04-10 00:00:00", - "start": "2023-04-09T14:00:00.000Z", - "end": "2023-04-10T14:00:00.000Z", + "start": "2023-04-09T13:00:00.000Z", + "end": "2023-04-10T13:00:00.000Z", "name": "Easter Monday", "type": "public", "rule": "easter 1", @@ -64,8 +64,8 @@ }, { "date": "2023-04-25 00:00:00", - "start": "2023-04-24T14:00:00.000Z", - "end": "2023-04-25T14:00:00.000Z", + "start": "2023-04-24T13:00:00.000Z", + "end": "2023-04-25T13:00:00.000Z", "name": "Anzac Day", "type": "public", "rule": "04-25", @@ -73,8 +73,8 @@ }, { "date": "2023-05-14 00:00:00", - "start": "2023-05-13T14:00:00.000Z", - "end": "2023-05-14T14:00:00.000Z", + "start": "2023-05-13T13:00:00.000Z", + "end": "2023-05-14T13:00:00.000Z", "name": "Mother's Day", "type": "observance", "rule": "2nd sunday in May", @@ -82,8 +82,8 @@ }, { "date": "2023-09-03 00:00:00", - "start": "2023-09-02T14:00:00.000Z", - "end": "2023-09-03T14:00:00.000Z", + "start": "2023-09-02T13:00:00.000Z", + "end": "2023-09-03T13:00:00.000Z", "name": "Father's Day", "type": "observance", "rule": "1st sunday in September", @@ -91,8 +91,8 @@ }, { "date": "2023-12-25 00:00:00", - "start": "2023-12-24T13:00:00.000Z", - "end": "2023-12-25T13:00:00.000Z", + "start": "2023-12-24T12:00:00.000Z", + "end": "2023-12-25T12:00:00.000Z", "name": "Christmas Day", "type": "public", "rule": "12-25 and if saturday then next monday if sunday then next tuesday", @@ -100,8 +100,8 @@ }, { "date": "2023-12-26 00:00:00", - "start": "2023-12-25T13:00:00.000Z", - "end": "2023-12-26T13:00:00.000Z", + "start": "2023-12-25T12:00:00.000Z", + "end": "2023-12-26T12:00:00.000Z", "name": "Boxing Day", "type": "public", "rule": "12-26 and if saturday then next monday if sunday then next tuesday", diff --git a/test/fixtures/AU-2024.json b/test/fixtures/AU-2024.json index 80a4e3b06..4b539a12e 100644 --- a/test/fixtures/AU-2024.json +++ b/test/fixtures/AU-2024.json @@ -55,8 +55,8 @@ }, { "date": "2024-04-25 00:00:00", - "start": "2024-04-24T14:00:00.000Z", - "end": "2024-04-25T14:00:00.000Z", + "start": "2024-04-24T13:00:00.000Z", + "end": "2024-04-25T13:00:00.000Z", "name": "Anzac Day", "type": "public", "rule": "04-25", @@ -64,8 +64,8 @@ }, { "date": "2024-05-12 00:00:00", - "start": "2024-05-11T14:00:00.000Z", - "end": "2024-05-12T14:00:00.000Z", + "start": "2024-05-11T13:00:00.000Z", + "end": "2024-05-12T13:00:00.000Z", "name": "Mother's Day", "type": "observance", "rule": "2nd sunday in May", @@ -73,8 +73,8 @@ }, { "date": "2024-09-01 00:00:00", - "start": "2024-08-31T14:00:00.000Z", - "end": "2024-09-01T14:00:00.000Z", + "start": "2024-08-31T13:00:00.000Z", + "end": "2024-09-01T13:00:00.000Z", "name": "Father's Day", "type": "observance", "rule": "1st sunday in September", diff --git a/test/fixtures/AU-2025.json b/test/fixtures/AU-2025.json index 1e00b6289..21b0caa0e 100644 --- a/test/fixtures/AU-2025.json +++ b/test/fixtures/AU-2025.json @@ -19,8 +19,8 @@ }, { "date": "2025-04-18 00:00:00", - "start": "2025-04-17T14:00:00.000Z", - "end": "2025-04-18T14:00:00.000Z", + "start": "2025-04-17T13:00:00.000Z", + "end": "2025-04-18T13:00:00.000Z", "name": "Good Friday", "type": "public", "rule": "easter -2", @@ -28,8 +28,8 @@ }, { "date": "2025-04-19 00:00:00", - "start": "2025-04-18T14:00:00.000Z", - "end": "2025-04-19T14:00:00.000Z", + "start": "2025-04-18T13:00:00.000Z", + "end": "2025-04-19T13:00:00.000Z", "name": "Easter Saturday", "type": "public", "rule": "easter -1", @@ -37,8 +37,8 @@ }, { "date": "2025-04-20 00:00:00", - "start": "2025-04-19T14:00:00.000Z", - "end": "2025-04-20T14:00:00.000Z", + "start": "2025-04-19T13:00:00.000Z", + "end": "2025-04-20T13:00:00.000Z", "name": "Easter Sunday", "type": "public", "rule": "easter", @@ -46,8 +46,8 @@ }, { "date": "2025-04-21 00:00:00", - "start": "2025-04-20T14:00:00.000Z", - "end": "2025-04-21T14:00:00.000Z", + "start": "2025-04-20T13:00:00.000Z", + "end": "2025-04-21T13:00:00.000Z", "name": "Easter Monday", "type": "public", "rule": "easter 1", @@ -55,8 +55,8 @@ }, { "date": "2025-04-25 00:00:00", - "start": "2025-04-24T14:00:00.000Z", - "end": "2025-04-25T14:00:00.000Z", + "start": "2025-04-24T13:00:00.000Z", + "end": "2025-04-25T13:00:00.000Z", "name": "Anzac Day", "type": "public", "rule": "04-25", @@ -64,8 +64,8 @@ }, { "date": "2025-05-11 00:00:00", - "start": "2025-05-10T14:00:00.000Z", - "end": "2025-05-11T14:00:00.000Z", + "start": "2025-05-10T13:00:00.000Z", + "end": "2025-05-11T13:00:00.000Z", "name": "Mother's Day", "type": "observance", "rule": "2nd sunday in May", @@ -73,8 +73,8 @@ }, { "date": "2025-09-07 00:00:00", - "start": "2025-09-06T14:00:00.000Z", - "end": "2025-09-07T14:00:00.000Z", + "start": "2025-09-06T13:00:00.000Z", + "end": "2025-09-07T13:00:00.000Z", "name": "Father's Day", "type": "observance", "rule": "1st sunday in September", diff --git a/test/fixtures/AU-ACT-NF-2020.json b/test/fixtures/AU-ACT-NF-2020.json index dedffc1e9..69fd03c6e 100644 --- a/test/fixtures/AU-ACT-NF-2020.json +++ b/test/fixtures/AU-ACT-NF-2020.json @@ -35,15 +35,6 @@ "rule": "easter -2", "_weekday": "Fri" }, - { - "date": "2020-04-12 00:00:00", - "start": "2020-04-11T14:00:00.000Z", - "end": "2020-04-12T14:00:00.000Z", - "name": "Easter Sunday", - "type": "public", - "rule": "easter", - "_weekday": "Sun" - }, { "date": "2020-04-13 00:00:00", "start": "2020-04-12T14:00:00.000Z", @@ -62,15 +53,42 @@ "rule": "04-25", "_weekday": "Sat" }, + { + "date": "2020-05-10 00:00:00", + "start": "2020-05-09T14:00:00.000Z", + "end": "2020-05-10T14:00:00.000Z", + "name": "Mother's Day", + "type": "observance", + "rule": "2nd sunday in May", + "_weekday": "Sun" + }, { "date": "2020-06-08 00:00:00", "start": "2020-06-07T14:00:00.000Z", "end": "2020-06-08T14:00:00.000Z", "name": "Anniversary (Bounty) Day", "type": "public", - "rule": "06-08 and if saturday,sunday then next monday", + "rule": "06-08 if saturday,sunday then next monday", "_weekday": "Mon" }, + { + "date": "2020-06-15 00:00:00", + "start": "2020-06-14T14:00:00.000Z", + "end": "2020-06-15T14:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "monday after 2nd saturday in June if is public holiday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-09-06 00:00:00", + "start": "2020-09-05T14:00:00.000Z", + "end": "2020-09-06T14:00:00.000Z", + "name": "Father's Day", + "type": "observance", + "rule": "1st sunday in September", + "_weekday": "Sun" + }, { "date": "2020-10-12 00:00:00", "start": "2020-10-11T13:00:00.000Z", From 7eb8a9bff140bb4860c01284dffe3b87bc82f62f Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 6 Jan 2022 12:45:02 +1000 Subject: [PATCH 9/9] fix(AU): add missing years for NL --- README.md | 1 + test/fixtures/AU-ACT-NF-2019.json | 128 ++++++++++++++++++++++++ test/fixtures/AU-ACT-NF-2021.json | 157 ++++++++++++++++++++++++++++++ test/fixtures/AU-ACT-NF-2022.json | 156 +++++++++++++++++++++++++++++ test/fixtures/AU-ACT-NF-2023.json | 137 ++++++++++++++++++++++++++ 5 files changed, 579 insertions(+) create mode 100644 test/fixtures/AU-ACT-NF-2019.json create mode 100644 test/fixtures/AU-ACT-NF-2021.json create mode 100644 test/fixtures/AU-ACT-NF-2022.json create mode 100644 test/fixtures/AU-ACT-NF-2023.json diff --git a/README.md b/README.md index cb0e34d76..3ccca87c9 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ Countries: 195 │ └── 9: Wien ├── AU: Australia │ ├── ACT: Australian Capital Territory +│ │ └── NF: Norfolk Island │ ├── NSW: New South Wales │ ├── NT: Northern Territory │ ├── QLD: Queensland diff --git a/test/fixtures/AU-ACT-NF-2019.json b/test/fixtures/AU-ACT-NF-2019.json new file mode 100644 index 000000000..620793f7e --- /dev/null +++ b/test/fixtures/AU-ACT-NF-2019.json @@ -0,0 +1,128 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T13:00:00.000Z", + "end": "2019-01-01T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2019-01-28 00:00:00", + "start": "2019-01-27T13:00:00.000Z", + "end": "2019-01-28T13:00:00.000Z", + "name": "Australia Day", + "type": "public", + "rule": "01-26 if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-03-06 00:00:00", + "start": "2019-03-05T13:00:00.000Z", + "end": "2019-03-06T13:00:00.000Z", + "name": "Foundation Day", + "type": "public", + "rule": "03-06 and if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T14:00:00.000Z", + "end": "2019-04-19T14:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-22 00:00:00", + "start": "2019-04-21T14:00:00.000Z", + "end": "2019-04-22T14:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2019-04-25 00:00:00", + "start": "2019-04-24T14:00:00.000Z", + "end": "2019-04-25T14:00:00.000Z", + "name": "Anzac Day", + "type": "public", + "rule": "04-25", + "_weekday": "Thu" + }, + { + "date": "2019-05-12 00:00:00", + "start": "2019-05-11T14:00:00.000Z", + "end": "2019-05-12T14:00:00.000Z", + "name": "Mother's Day", + "type": "observance", + "rule": "2nd sunday in May", + "_weekday": "Sun" + }, + { + "date": "2019-06-10 00:00:00", + "start": "2019-06-09T14:00:00.000Z", + "end": "2019-06-10T14:00:00.000Z", + "name": "Anniversary (Bounty) Day", + "type": "public", + "rule": "06-08 if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-06-17 00:00:00", + "start": "2019-06-16T14:00:00.000Z", + "end": "2019-06-17T14:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "monday after 2nd saturday in June if is public holiday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-09-01 00:00:00", + "start": "2019-08-31T14:00:00.000Z", + "end": "2019-09-01T14:00:00.000Z", + "name": "Father's Day", + "type": "observance", + "rule": "1st sunday in September", + "_weekday": "Sun" + }, + { + "date": "2019-10-14 00:00:00", + "start": "2019-10-13T13:00:00.000Z", + "end": "2019-10-14T13:00:00.000Z", + "name": "Norfolk Island Agricultural Show", + "type": "public", + "rule": "2nd monday in October", + "_weekday": "Mon" + }, + { + "date": "2019-11-27 00:00:00", + "start": "2019-11-26T13:00:00.000Z", + "end": "2019-11-27T13:00:00.000Z", + "name": "Thanksgiving Day", + "type": "public", + "rule": "Wednesday before 12-01", + "_weekday": "Wed" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T13:00:00.000Z", + "end": "2019-12-25T13:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2019-12-26 00:00:00", + "start": "2019-12-25T13:00:00.000Z", + "end": "2019-12-26T13:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/AU-ACT-NF-2021.json b/test/fixtures/AU-ACT-NF-2021.json new file mode 100644 index 000000000..156001463 --- /dev/null +++ b/test/fixtures/AU-ACT-NF-2021.json @@ -0,0 +1,157 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T13:00:00.000Z", + "end": "2021-01-01T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2021-01-26 00:00:00", + "start": "2021-01-25T13:00:00.000Z", + "end": "2021-01-26T13:00:00.000Z", + "name": "Australia Day", + "type": "public", + "rule": "01-26 if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2021-03-06 00:00:00", + "start": "2021-03-05T13:00:00.000Z", + "end": "2021-03-06T13:00:00.000Z", + "name": "Foundation Day", + "type": "public", + "rule": "03-06 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2021-03-08 00:00:00", + "start": "2021-03-07T13:00:00.000Z", + "end": "2021-03-08T13:00:00.000Z", + "name": "Foundation Day", + "type": "public", + "rule": "03-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T13:00:00.000Z", + "end": "2021-04-02T13:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-05 00:00:00", + "start": "2021-04-04T14:00:00.000Z", + "end": "2021-04-05T14:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2021-04-25 00:00:00", + "start": "2021-04-24T14:00:00.000Z", + "end": "2021-04-25T14:00:00.000Z", + "name": "Anzac Day", + "type": "public", + "rule": "04-25", + "_weekday": "Sun" + }, + { + "date": "2021-05-09 00:00:00", + "start": "2021-05-08T14:00:00.000Z", + "end": "2021-05-09T14:00:00.000Z", + "name": "Mother's Day", + "type": "observance", + "rule": "2nd sunday in May", + "_weekday": "Sun" + }, + { + "date": "2021-06-08 00:00:00", + "start": "2021-06-07T14:00:00.000Z", + "end": "2021-06-08T14:00:00.000Z", + "name": "Anniversary (Bounty) Day", + "type": "public", + "rule": "06-08 if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2021-06-14 00:00:00", + "start": "2021-06-13T14:00:00.000Z", + "end": "2021-06-14T14:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "monday after 2nd saturday in June if is public holiday then next monday", + "_weekday": "Mon" + }, + { + "date": "2021-09-05 00:00:00", + "start": "2021-09-04T14:00:00.000Z", + "end": "2021-09-05T14:00:00.000Z", + "name": "Father's Day", + "type": "observance", + "rule": "1st sunday in September", + "_weekday": "Sun" + }, + { + "date": "2021-10-11 00:00:00", + "start": "2021-10-10T13:00:00.000Z", + "end": "2021-10-11T13:00:00.000Z", + "name": "Norfolk Island Agricultural Show", + "type": "public", + "rule": "2nd monday in October", + "_weekday": "Mon" + }, + { + "date": "2021-11-24 00:00:00", + "start": "2021-11-23T13:00:00.000Z", + "end": "2021-11-24T13:00:00.000Z", + "name": "Thanksgiving Day", + "type": "public", + "rule": "Wednesday before 12-01", + "_weekday": "Wed" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T13:00:00.000Z", + "end": "2021-12-25T13:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2021-12-26 00:00:00", + "start": "2021-12-25T13:00:00.000Z", + "end": "2021-12-26T13:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2021-12-27 00:00:00", + "start": "2021-12-26T13:00:00.000Z", + "end": "2021-12-27T13:00:00.000Z", + "name": "Christmas Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2021-12-28 00:00:00", + "start": "2021-12-27T13:00:00.000Z", + "end": "2021-12-28T13:00:00.000Z", + "name": "Boxing Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/AU-ACT-NF-2022.json b/test/fixtures/AU-ACT-NF-2022.json new file mode 100644 index 000000000..d4b5dd13c --- /dev/null +++ b/test/fixtures/AU-ACT-NF-2022.json @@ -0,0 +1,156 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T13:00:00.000Z", + "end": "2022-01-01T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2022-01-03 00:00:00", + "start": "2022-01-02T13:00:00.000Z", + "end": "2022-01-03T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-01-26 00:00:00", + "start": "2022-01-25T13:00:00.000Z", + "end": "2022-01-26T13:00:00.000Z", + "name": "Australia Day", + "type": "public", + "rule": "01-26 if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2022-03-06 00:00:00", + "start": "2022-03-05T13:00:00.000Z", + "end": "2022-03-06T13:00:00.000Z", + "name": "Foundation Day", + "type": "public", + "rule": "03-06 and if saturday,sunday then next monday", + "_weekday": "Sun" + }, + { + "date": "2022-03-07 00:00:00", + "start": "2022-03-06T13:00:00.000Z", + "end": "2022-03-07T13:00:00.000Z", + "name": "Foundation Day", + "type": "public", + "rule": "03-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T14:00:00.000Z", + "end": "2022-04-15T14:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-18 00:00:00", + "start": "2022-04-17T14:00:00.000Z", + "end": "2022-04-18T14:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2022-04-25 00:00:00", + "start": "2022-04-24T14:00:00.000Z", + "end": "2022-04-25T14:00:00.000Z", + "name": "Anzac Day", + "type": "public", + "rule": "04-25", + "_weekday": "Mon" + }, + { + "date": "2022-05-08 00:00:00", + "start": "2022-05-07T14:00:00.000Z", + "end": "2022-05-08T14:00:00.000Z", + "name": "Mother's Day", + "type": "observance", + "rule": "2nd sunday in May", + "_weekday": "Sun" + }, + { + "date": "2022-06-08 00:00:00", + "start": "2022-06-07T14:00:00.000Z", + "end": "2022-06-08T14:00:00.000Z", + "name": "Anniversary (Bounty) Day", + "type": "public", + "rule": "06-08 if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2022-06-13 00:00:00", + "start": "2022-06-12T14:00:00.000Z", + "end": "2022-06-13T14:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "monday after 2nd saturday in June if is public holiday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-09-04 00:00:00", + "start": "2022-09-03T14:00:00.000Z", + "end": "2022-09-04T14:00:00.000Z", + "name": "Father's Day", + "type": "observance", + "rule": "1st sunday in September", + "_weekday": "Sun" + }, + { + "date": "2022-10-10 00:00:00", + "start": "2022-10-09T13:00:00.000Z", + "end": "2022-10-10T13:00:00.000Z", + "name": "Norfolk Island Agricultural Show", + "type": "public", + "rule": "2nd monday in October", + "_weekday": "Mon" + }, + { + "date": "2022-11-30 00:00:00", + "start": "2022-11-29T13:00:00.000Z", + "end": "2022-11-30T13:00:00.000Z", + "name": "Thanksgiving Day", + "type": "public", + "rule": "Wednesday before 12-01", + "_weekday": "Wed" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T13:00:00.000Z", + "end": "2022-12-25T13:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T13:00:00.000Z", + "end": "2022-12-26T13:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2022-12-27 00:00:00", + "start": "2022-12-26T13:00:00.000Z", + "end": "2022-12-27T13:00:00.000Z", + "name": "Christmas Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/AU-ACT-NF-2023.json b/test/fixtures/AU-ACT-NF-2023.json new file mode 100644 index 000000000..f226b3800 --- /dev/null +++ b/test/fixtures/AU-ACT-NF-2023.json @@ -0,0 +1,137 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T13:00:00.000Z", + "end": "2023-01-01T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T13:00:00.000Z", + "end": "2023-01-02T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-01-26 00:00:00", + "start": "2023-01-25T13:00:00.000Z", + "end": "2023-01-26T13:00:00.000Z", + "name": "Australia Day", + "type": "public", + "rule": "01-26 if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2023-03-06 00:00:00", + "start": "2023-03-05T13:00:00.000Z", + "end": "2023-03-06T13:00:00.000Z", + "name": "Foundation Day", + "type": "public", + "rule": "03-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T14:00:00.000Z", + "end": "2023-04-07T14:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-10 00:00:00", + "start": "2023-04-09T14:00:00.000Z", + "end": "2023-04-10T14:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2023-04-25 00:00:00", + "start": "2023-04-24T14:00:00.000Z", + "end": "2023-04-25T14:00:00.000Z", + "name": "Anzac Day", + "type": "public", + "rule": "04-25", + "_weekday": "Tue" + }, + { + "date": "2023-05-14 00:00:00", + "start": "2023-05-13T14:00:00.000Z", + "end": "2023-05-14T14:00:00.000Z", + "name": "Mother's Day", + "type": "observance", + "rule": "2nd sunday in May", + "_weekday": "Sun" + }, + { + "date": "2023-06-08 00:00:00", + "start": "2023-06-07T14:00:00.000Z", + "end": "2023-06-08T14:00:00.000Z", + "name": "Anniversary (Bounty) Day", + "type": "public", + "rule": "06-08 if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2023-06-12 00:00:00", + "start": "2023-06-11T14:00:00.000Z", + "end": "2023-06-12T14:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "monday after 2nd saturday in June if is public holiday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-09-03 00:00:00", + "start": "2023-09-02T14:00:00.000Z", + "end": "2023-09-03T14:00:00.000Z", + "name": "Father's Day", + "type": "observance", + "rule": "1st sunday in September", + "_weekday": "Sun" + }, + { + "date": "2023-10-09 00:00:00", + "start": "2023-10-08T13:00:00.000Z", + "end": "2023-10-09T13:00:00.000Z", + "name": "Norfolk Island Agricultural Show", + "type": "public", + "rule": "2nd monday in October", + "_weekday": "Mon" + }, + { + "date": "2023-11-29 00:00:00", + "start": "2023-11-28T13:00:00.000Z", + "end": "2023-11-29T13:00:00.000Z", + "name": "Thanksgiving Day", + "type": "public", + "rule": "Wednesday before 12-01", + "_weekday": "Wed" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T13:00:00.000Z", + "end": "2023-12-25T13:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2023-12-26 00:00:00", + "start": "2023-12-25T13:00:00.000Z", + "end": "2023-12-26T13:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + } +] \ No newline at end of file