From cf431cc65554f7e0f5a00528530d96ccbed4937a Mon Sep 17 00:00:00 2001 From: commenthol Date: Tue, 16 Nov 2021 21:48:05 +0100 Subject: [PATCH 1/2] fix(NZ,#288): add Matariki and missing regions --- README.md | 5 + data/countries/NZ.yaml | 156 ++++++++++++++++++++++++++++--- test/fixtures/NZ-2022.json | 9 ++ test/fixtures/NZ-2023.json | 9 ++ test/fixtures/NZ-2024.json | 9 ++ test/fixtures/NZ-2025.json | 9 ++ test/fixtures/NZ-AUK-2022.json | 9 ++ test/fixtures/NZ-AUK-2023.json | 9 ++ test/fixtures/NZ-AUK-2024.json | 9 ++ test/fixtures/NZ-AUK-2025.json | 9 ++ test/fixtures/NZ-BOP-2015.json | 121 ++++++++++++++++++++++++ test/fixtures/NZ-BOP-2016.json | 131 ++++++++++++++++++++++++++ test/fixtures/NZ-BOP-2017.json | 111 ++++++++++++++++++++++ test/fixtures/NZ-BOP-2018.json | 101 ++++++++++++++++++++ test/fixtures/NZ-BOP-2019.json | 101 ++++++++++++++++++++ test/fixtures/NZ-BOP-2020.json | 121 ++++++++++++++++++++++++ test/fixtures/NZ-BOP-2021.json | 151 ++++++++++++++++++++++++++++++ test/fixtures/NZ-BOP-2022.json | 150 +++++++++++++++++++++++++++++ test/fixtures/NZ-BOP-2023.json | 120 ++++++++++++++++++++++++ test/fixtures/NZ-BOP-2024.json | 110 ++++++++++++++++++++++ test/fixtures/NZ-BOP-2025.json | 110 ++++++++++++++++++++++ test/fixtures/NZ-CAN-2022.json | 9 ++ test/fixtures/NZ-CAN-2023.json | 9 ++ test/fixtures/NZ-CAN-2024.json | 9 ++ test/fixtures/NZ-CAN-2025.json | 9 ++ test/fixtures/NZ-CAN-S-2022.json | 9 ++ test/fixtures/NZ-CAN-S-2023.json | 9 ++ test/fixtures/NZ-CAN-S-2024.json | 9 ++ test/fixtures/NZ-CAN-S-2025.json | 9 ++ test/fixtures/NZ-CIT-2022.json | 9 ++ test/fixtures/NZ-CIT-2023.json | 9 ++ test/fixtures/NZ-CIT-2024.json | 9 ++ test/fixtures/NZ-CIT-2025.json | 9 ++ test/fixtures/NZ-GIS-2015.json | 121 ++++++++++++++++++++++++ test/fixtures/NZ-GIS-2016.json | 131 ++++++++++++++++++++++++++ test/fixtures/NZ-GIS-2017.json | 111 ++++++++++++++++++++++ test/fixtures/NZ-GIS-2018.json | 101 ++++++++++++++++++++ test/fixtures/NZ-GIS-2019.json | 101 ++++++++++++++++++++ test/fixtures/NZ-GIS-2020.json | 121 ++++++++++++++++++++++++ test/fixtures/NZ-GIS-2021.json | 151 ++++++++++++++++++++++++++++++ test/fixtures/NZ-GIS-2022.json | 150 +++++++++++++++++++++++++++++ test/fixtures/NZ-GIS-2023.json | 120 ++++++++++++++++++++++++ test/fixtures/NZ-GIS-2024.json | 110 ++++++++++++++++++++++ test/fixtures/NZ-GIS-2025.json | 110 ++++++++++++++++++++++ test/fixtures/NZ-HKB-2022.json | 9 ++ test/fixtures/NZ-HKB-2023.json | 9 ++ test/fixtures/NZ-HKB-2024.json | 9 ++ test/fixtures/NZ-HKB-2025.json | 9 ++ test/fixtures/NZ-MBH-2022.json | 9 ++ test/fixtures/NZ-MBH-2023.json | 9 ++ test/fixtures/NZ-MBH-2024.json | 9 ++ test/fixtures/NZ-MBH-2025.json | 9 ++ test/fixtures/NZ-MWT-2015.json | 121 ++++++++++++++++++++++++ test/fixtures/NZ-MWT-2016.json | 131 ++++++++++++++++++++++++++ test/fixtures/NZ-MWT-2017.json | 111 ++++++++++++++++++++++ test/fixtures/NZ-MWT-2018.json | 101 ++++++++++++++++++++ test/fixtures/NZ-MWT-2019.json | 101 ++++++++++++++++++++ test/fixtures/NZ-MWT-2020.json | 121 ++++++++++++++++++++++++ test/fixtures/NZ-MWT-2021.json | 151 ++++++++++++++++++++++++++++++ test/fixtures/NZ-MWT-2022.json | 150 +++++++++++++++++++++++++++++ test/fixtures/NZ-MWT-2023.json | 120 ++++++++++++++++++++++++ test/fixtures/NZ-MWT-2024.json | 110 ++++++++++++++++++++++ test/fixtures/NZ-MWT-2025.json | 110 ++++++++++++++++++++++ test/fixtures/NZ-NSN-2022.json | 9 ++ test/fixtures/NZ-NSN-2023.json | 9 ++ test/fixtures/NZ-NSN-2024.json | 9 ++ test/fixtures/NZ-NSN-2025.json | 9 ++ test/fixtures/NZ-NTL-2022.json | 9 ++ test/fixtures/NZ-NTL-2023.json | 9 ++ test/fixtures/NZ-NTL-2024.json | 9 ++ test/fixtures/NZ-NTL-2025.json | 9 ++ test/fixtures/NZ-OTA-2022.json | 9 ++ test/fixtures/NZ-OTA-2023.json | 9 ++ test/fixtures/NZ-OTA-2024.json | 9 ++ test/fixtures/NZ-OTA-2025.json | 9 ++ test/fixtures/NZ-STL-2022.json | 9 ++ test/fixtures/NZ-STL-2023.json | 9 ++ test/fixtures/NZ-STL-2024.json | 9 ++ test/fixtures/NZ-STL-2025.json | 9 ++ test/fixtures/NZ-TAS-2015.json | 121 ++++++++++++++++++++++++ test/fixtures/NZ-TAS-2016.json | 131 ++++++++++++++++++++++++++ test/fixtures/NZ-TAS-2017.json | 111 ++++++++++++++++++++++ test/fixtures/NZ-TAS-2018.json | 101 ++++++++++++++++++++ test/fixtures/NZ-TAS-2019.json | 101 ++++++++++++++++++++ test/fixtures/NZ-TAS-2020.json | 121 ++++++++++++++++++++++++ test/fixtures/NZ-TAS-2021.json | 151 ++++++++++++++++++++++++++++++ test/fixtures/NZ-TAS-2022.json | 150 +++++++++++++++++++++++++++++ test/fixtures/NZ-TAS-2023.json | 120 ++++++++++++++++++++++++ test/fixtures/NZ-TAS-2024.json | 110 ++++++++++++++++++++++ test/fixtures/NZ-TAS-2025.json | 110 ++++++++++++++++++++++ test/fixtures/NZ-TKI-2022.json | 9 ++ test/fixtures/NZ-TKI-2023.json | 9 ++ test/fixtures/NZ-TKI-2024.json | 9 ++ test/fixtures/NZ-TKI-2025.json | 9 ++ test/fixtures/NZ-WGN-2022.json | 9 ++ test/fixtures/NZ-WGN-2023.json | 9 ++ test/fixtures/NZ-WGN-2024.json | 9 ++ test/fixtures/NZ-WGN-2025.json | 9 ++ test/fixtures/NZ-WKO-2015.json | 121 ++++++++++++++++++++++++ test/fixtures/NZ-WKO-2016.json | 131 ++++++++++++++++++++++++++ test/fixtures/NZ-WKO-2017.json | 111 ++++++++++++++++++++++ test/fixtures/NZ-WKO-2018.json | 101 ++++++++++++++++++++ test/fixtures/NZ-WKO-2019.json | 101 ++++++++++++++++++++ test/fixtures/NZ-WKO-2020.json | 121 ++++++++++++++++++++++++ test/fixtures/NZ-WKO-2021.json | 151 ++++++++++++++++++++++++++++++ test/fixtures/NZ-WKO-2022.json | 150 +++++++++++++++++++++++++++++ test/fixtures/NZ-WKO-2023.json | 120 ++++++++++++++++++++++++ test/fixtures/NZ-WKO-2024.json | 110 ++++++++++++++++++++++ test/fixtures/NZ-WKO-2025.json | 110 ++++++++++++++++++++++ test/fixtures/NZ-WTC-2022.json | 9 ++ test/fixtures/NZ-WTC-2023.json | 9 ++ test/fixtures/NZ-WTC-2024.json | 9 ++ test/fixtures/NZ-WTC-2025.json | 9 ++ 113 files changed, 7289 insertions(+), 11 deletions(-) create mode 100644 test/fixtures/NZ-BOP-2015.json create mode 100644 test/fixtures/NZ-BOP-2016.json create mode 100644 test/fixtures/NZ-BOP-2017.json create mode 100644 test/fixtures/NZ-BOP-2018.json create mode 100644 test/fixtures/NZ-BOP-2019.json create mode 100644 test/fixtures/NZ-BOP-2020.json create mode 100644 test/fixtures/NZ-BOP-2021.json create mode 100644 test/fixtures/NZ-BOP-2022.json create mode 100644 test/fixtures/NZ-BOP-2023.json create mode 100644 test/fixtures/NZ-BOP-2024.json create mode 100644 test/fixtures/NZ-BOP-2025.json create mode 100644 test/fixtures/NZ-GIS-2015.json create mode 100644 test/fixtures/NZ-GIS-2016.json create mode 100644 test/fixtures/NZ-GIS-2017.json create mode 100644 test/fixtures/NZ-GIS-2018.json create mode 100644 test/fixtures/NZ-GIS-2019.json create mode 100644 test/fixtures/NZ-GIS-2020.json create mode 100644 test/fixtures/NZ-GIS-2021.json create mode 100644 test/fixtures/NZ-GIS-2022.json create mode 100644 test/fixtures/NZ-GIS-2023.json create mode 100644 test/fixtures/NZ-GIS-2024.json create mode 100644 test/fixtures/NZ-GIS-2025.json create mode 100644 test/fixtures/NZ-MWT-2015.json create mode 100644 test/fixtures/NZ-MWT-2016.json create mode 100644 test/fixtures/NZ-MWT-2017.json create mode 100644 test/fixtures/NZ-MWT-2018.json create mode 100644 test/fixtures/NZ-MWT-2019.json create mode 100644 test/fixtures/NZ-MWT-2020.json create mode 100644 test/fixtures/NZ-MWT-2021.json create mode 100644 test/fixtures/NZ-MWT-2022.json create mode 100644 test/fixtures/NZ-MWT-2023.json create mode 100644 test/fixtures/NZ-MWT-2024.json create mode 100644 test/fixtures/NZ-MWT-2025.json create mode 100644 test/fixtures/NZ-TAS-2015.json create mode 100644 test/fixtures/NZ-TAS-2016.json create mode 100644 test/fixtures/NZ-TAS-2017.json create mode 100644 test/fixtures/NZ-TAS-2018.json create mode 100644 test/fixtures/NZ-TAS-2019.json create mode 100644 test/fixtures/NZ-TAS-2020.json create mode 100644 test/fixtures/NZ-TAS-2021.json create mode 100644 test/fixtures/NZ-TAS-2022.json create mode 100644 test/fixtures/NZ-TAS-2023.json create mode 100644 test/fixtures/NZ-TAS-2024.json create mode 100644 test/fixtures/NZ-TAS-2025.json create mode 100644 test/fixtures/NZ-WKO-2015.json create mode 100644 test/fixtures/NZ-WKO-2016.json create mode 100644 test/fixtures/NZ-WKO-2017.json create mode 100644 test/fixtures/NZ-WKO-2018.json create mode 100644 test/fixtures/NZ-WKO-2019.json create mode 100644 test/fixtures/NZ-WKO-2020.json create mode 100644 test/fixtures/NZ-WKO-2021.json create mode 100644 test/fixtures/NZ-WKO-2022.json create mode 100644 test/fixtures/NZ-WKO-2023.json create mode 100644 test/fixtures/NZ-WKO-2024.json create mode 100644 test/fixtures/NZ-WKO-2025.json diff --git a/README.md b/README.md index b38a5e99c..024218148 100644 --- a/README.md +++ b/README.md @@ -389,16 +389,21 @@ Countries: 194 ├── NO: Norge ├── NZ: New Zealand │ ├── AUK: Auckland Province +│ ├── BOP: Bay of Plenty │ ├── CAN: Canterbury │ │ └── S: South Canterbury │ ├── CIT: Chatham Islands +│ ├── GIS: Gisborne │ ├── HKB: Hawke's Bay │ ├── MBH: Marlborough +│ ├── MWT: Manawatu-Wanganui │ ├── NSN: Nelson │ ├── NTL: Northland │ ├── OTA: Otago Province │ ├── STL: Southland +│ ├── TAS: Tasman │ ├── TKI: Taranaki +│ ├── WKO: Waikato │ ├── WGN: Wellington Province │ └── WTC: Westland ├── PA: Panamá diff --git a/data/countries/NZ.yaml b/data/countries/NZ.yaml index 1b7b329c0..c7f4dc17b 100644 --- a/data/countries/NZ.yaml +++ b/data/countries/NZ.yaml @@ -4,9 +4,11 @@ holidays: NZ: names: en: New Zealand + mi: Aotearoa dayoff: sunday langs: - en + - mi zones: - Pacific/Auckland - Pacific/Chatham @@ -44,15 +46,117 @@ holidays: 12-26 and if saturday then next monday if sunday then next tuesday: substitute: true _name: 12-26 + # @source https://www.mbie.govt.nz/assets/matariki-dates-2022-to-2052-matariki-advisory-group.pdf + "2022-06-24": + name: + en: Matariki + "2023-07-14": + name: + en: Matariki + "2024-06-28": + name: + en: Matariki + "2025-06-20": + name: + en: Matariki + "2026-07-10": + name: + en: Matariki + "2027-06-25": + name: + en: Matariki + "2028-07-14": + name: + en: Matariki + "2029-07-06": + name: + en: Matariki + "2030-06-21": + name: + en: Matariki + "2031-07-11": + name: + en: Matariki + "2032-07-02": + name: + en: Matariki + "2033-06-24": + name: + en: Matariki + "2034-07-07": + name: + en: Matariki + "2035-06-29": + name: + en: Matariki + "2036-07-21": + name: + en: Matariki + "2037-07-10": + name: + en: Matariki + "2038-06-25": + name: + en: Matariki + "2039-07-15": + name: + en: Matariki + "2040-07-06": + name: + en: Matariki + "2041-07-19": + name: + en: Matariki + "2042-07-11": + name: + en: Matariki + "2043-07-03": + name: + en: Matariki + "2044-06-24": + name: + en: Matariki + "2045-07-07": + name: + en: Matariki + "2046-06-29": + name: + en: Matariki + "2047-07-19": + name: + en: Matariki + "2048-07-03": + name: + en: Matariki + "2049-06-25": + name: + en: Matariki + "2050-07-15": + name: + en: Matariki + "2051-06-30": + name: + en: Matariki + "2052-06-21": + name: + en: Matariki states: AUK: - name: Auckland Province + names: + en: Auckland Province + mi: Tāmaki-makau-rau days: 01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday: name: en: Provincial anniversary day + BOP: + names: + en: Bay of Plenty + mi: Te Moana-a-Toi CAN: - name: Canterbury + names: + en: Canterbury + mi: Waitaha days: friday after 2nd tuesday in November: name: @@ -66,62 +170,92 @@ holidays: name: en: Dominion Day CIT: - name: Chatham Islands + names: + en: Chatham Islands + mi: Wharekauri days: 11-30 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday: name: en: Provincial anniversary day + GIS: + names: + en: Gisborne + mi: Te Tai Rāwhiti HKB: - name: Hawke's Bay + names: + en: Hawke's Bay + mi: Te Matau-a-Māui days: friday before 4th monday in October: name: en: Provincial anniversary day MBH: - name: Marlborough + names: + en: Marlborough + mi: Te Tauihu-o-te-waka days: 5th monday in October: name: en: Provincial anniversary day + MWT: + name: Manawatu-Wanganui NSN: - name: Nelson + names: + en: Nelson + mi: Whakatū days: 02-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday: name: en: Provincial anniversary day NTL: - name: Northland + names: + en: Northland + mi: Te Tai Tokerau days: 01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday: name: en: Provincial anniversary day OTA: - name: Otago Province + names: + en: Otago Province + mi: Ōtākou days: 03-23 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday: name: en: Provincial anniversary day note: varies if coincides with easter monday STL: - name: Southland + names: + en: Southland + mi: Murihiku days: easter 2: name: en: Provincial anniversary day + TAS: + names: + en: Tasman + mi: Te Tai-o-Aorere TKI: name: Taranaki days: 2nd monday in March: name: en: Provincial anniversary day + WKO: + name: Waikato WGN: - name: Wellington Province + names: + en: Wellington Province + mi: Te Whanga-nui-a-Tara days: 01-22 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday: name: en: Provincial anniversary day WTC: - name: Westland + names: + en: Westland + mi: Te Tai Poutini days: 12-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday: name: diff --git a/test/fixtures/NZ-2022.json b/test/fixtures/NZ-2022.json index 6c487f426..651cb1aa6 100644 --- a/test/fixtures/NZ-2022.json +++ b/test/fixtures/NZ-2022.json @@ -101,6 +101,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, { "date": "2022-10-24 00:00:00", "start": "2022-10-23T11:00:00.000Z", diff --git a/test/fixtures/NZ-2023.json b/test/fixtures/NZ-2023.json index 41d3e806b..bb159b944 100644 --- a/test/fixtures/NZ-2023.json +++ b/test/fixtures/NZ-2023.json @@ -81,6 +81,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, { "date": "2023-10-23 00:00:00", "start": "2023-10-22T11:00:00.000Z", diff --git a/test/fixtures/NZ-2024.json b/test/fixtures/NZ-2024.json index 48091c88b..bc12e9a14 100644 --- a/test/fixtures/NZ-2024.json +++ b/test/fixtures/NZ-2024.json @@ -71,6 +71,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, { "date": "2024-10-28 00:00:00", "start": "2024-10-27T11:00:00.000Z", diff --git a/test/fixtures/NZ-2025.json b/test/fixtures/NZ-2025.json index 2dd8a1d06..692ba6a76 100644 --- a/test/fixtures/NZ-2025.json +++ b/test/fixtures/NZ-2025.json @@ -71,6 +71,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, { "date": "2025-10-27 00:00:00", "start": "2025-10-26T11:00:00.000Z", diff --git a/test/fixtures/NZ-AUK-2022.json b/test/fixtures/NZ-AUK-2022.json index a76b0e1ff..ab7ccc9b1 100644 --- a/test/fixtures/NZ-AUK-2022.json +++ b/test/fixtures/NZ-AUK-2022.json @@ -110,6 +110,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, { "date": "2022-10-24 00:00:00", "start": "2022-10-23T11:00:00.000Z", diff --git a/test/fixtures/NZ-AUK-2023.json b/test/fixtures/NZ-AUK-2023.json index f019f60e2..6bec3f021 100644 --- a/test/fixtures/NZ-AUK-2023.json +++ b/test/fixtures/NZ-AUK-2023.json @@ -90,6 +90,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, { "date": "2023-10-23 00:00:00", "start": "2023-10-22T11:00:00.000Z", diff --git a/test/fixtures/NZ-AUK-2024.json b/test/fixtures/NZ-AUK-2024.json index 7da9d102f..48fcfc6aa 100644 --- a/test/fixtures/NZ-AUK-2024.json +++ b/test/fixtures/NZ-AUK-2024.json @@ -80,6 +80,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, { "date": "2024-10-28 00:00:00", "start": "2024-10-27T11:00:00.000Z", diff --git a/test/fixtures/NZ-AUK-2025.json b/test/fixtures/NZ-AUK-2025.json index 5d13a3551..01601fb0a 100644 --- a/test/fixtures/NZ-AUK-2025.json +++ b/test/fixtures/NZ-AUK-2025.json @@ -80,6 +80,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, { "date": "2025-10-27 00:00:00", "start": "2025-10-26T11:00:00.000Z", diff --git a/test/fixtures/NZ-BOP-2015.json b/test/fixtures/NZ-BOP-2015.json new file mode 100644 index 000000000..c0a06d0bd --- /dev/null +++ b/test/fixtures/NZ-BOP-2015.json @@ -0,0 +1,121 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T11:00:00.000Z", + "end": "2015-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2015-01-02 00:00:00", + "start": "2015-01-01T11:00:00.000Z", + "end": "2015-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2015-02-06 00:00:00", + "start": "2015-02-05T11:00:00.000Z", + "end": "2015-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T11:00:00.000Z", + "end": "2015-04-03T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T11:00:00.000Z", + "end": "2015-04-05T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-04-06 00:00:00", + "start": "2015-04-05T12:00:00.000Z", + "end": "2015-04-06T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2015-04-25 00:00:00", + "start": "2015-04-24T12:00:00.000Z", + "end": "2015-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2015-04-27 00:00:00", + "start": "2015-04-26T12:00:00.000Z", + "end": "2015-04-27T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-06-01 00:00:00", + "start": "2015-05-31T12:00:00.000Z", + "end": "2015-06-01T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2015-10-26 00:00:00", + "start": "2015-10-25T11:00:00.000Z", + "end": "2015-10-26T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T11:00:00.000Z", + "end": "2015-12-25T11: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": "2015-12-26 00:00:00", + "start": "2015-12-25T11:00:00.000Z", + "end": "2015-12-26T11: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": "2015-12-28 00:00:00", + "start": "2015-12-27T11:00:00.000Z", + "end": "2015-12-28T11: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/NZ-BOP-2016.json b/test/fixtures/NZ-BOP-2016.json new file mode 100644 index 000000000..b7b23d51f --- /dev/null +++ b/test/fixtures/NZ-BOP-2016.json @@ -0,0 +1,131 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T11:00:00.000Z", + "end": "2016-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2016-01-02 00:00:00", + "start": "2016-01-01T11:00:00.000Z", + "end": "2016-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2016-01-04 00:00:00", + "start": "2016-01-03T11:00:00.000Z", + "end": "2016-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2016-02-06 00:00:00", + "start": "2016-02-05T11:00:00.000Z", + "end": "2016-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2016-02-08 00:00:00", + "start": "2016-02-07T11:00:00.000Z", + "end": "2016-02-08T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T11:00:00.000Z", + "end": "2016-03-25T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T11:00:00.000Z", + "end": "2016-03-27T11:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-03-28 00:00:00", + "start": "2016-03-27T11:00:00.000Z", + "end": "2016-03-28T11:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2016-04-25 00:00:00", + "start": "2016-04-24T12:00:00.000Z", + "end": "2016-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2016-06-06 00:00:00", + "start": "2016-06-05T12:00:00.000Z", + "end": "2016-06-06T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2016-10-24 00:00:00", + "start": "2016-10-23T11:00:00.000Z", + "end": "2016-10-24T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T11:00:00.000Z", + "end": "2016-12-25T11: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": "2016-12-26 00:00:00", + "start": "2016-12-25T11:00:00.000Z", + "end": "2016-12-26T11: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": "2016-12-27 00:00:00", + "start": "2016-12-26T11:00:00.000Z", + "end": "2016-12-27T11: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/NZ-BOP-2017.json b/test/fixtures/NZ-BOP-2017.json new file mode 100644 index 000000000..4c815ea98 --- /dev/null +++ b/test/fixtures/NZ-BOP-2017.json @@ -0,0 +1,111 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T11:00:00.000Z", + "end": "2017-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T11:00:00.000Z", + "end": "2017-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2017-01-03 00:00:00", + "start": "2017-01-02T11:00:00.000Z", + "end": "2017-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2017-02-06 00:00:00", + "start": "2017-02-05T11:00:00.000Z", + "end": "2017-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T12:00:00.000Z", + "end": "2017-04-14T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T12:00:00.000Z", + "end": "2017-04-16T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-04-17 00:00:00", + "start": "2017-04-16T12:00:00.000Z", + "end": "2017-04-17T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2017-04-25 00:00:00", + "start": "2017-04-24T12:00:00.000Z", + "end": "2017-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2017-06-05 00:00:00", + "start": "2017-06-04T12:00:00.000Z", + "end": "2017-06-05T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2017-10-23 00:00:00", + "start": "2017-10-22T11:00:00.000Z", + "end": "2017-10-23T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T11:00:00.000Z", + "end": "2017-12-25T11: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": "2017-12-26 00:00:00", + "start": "2017-12-25T11:00:00.000Z", + "end": "2017-12-26T11: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/NZ-BOP-2018.json b/test/fixtures/NZ-BOP-2018.json new file mode 100644 index 000000000..c22e3531d --- /dev/null +++ b/test/fixtures/NZ-BOP-2018.json @@ -0,0 +1,101 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T11:00:00.000Z", + "end": "2018-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2018-01-02 00:00:00", + "start": "2018-01-01T11:00:00.000Z", + "end": "2018-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2018-02-06 00:00:00", + "start": "2018-02-05T11:00:00.000Z", + "end": "2018-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T11:00:00.000Z", + "end": "2018-03-30T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T11:00:00.000Z", + "end": "2018-04-01T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-04-02 00:00:00", + "start": "2018-04-01T12:00:00.000Z", + "end": "2018-04-02T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2018-04-25 00:00:00", + "start": "2018-04-24T12:00:00.000Z", + "end": "2018-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2018-06-04 00:00:00", + "start": "2018-06-03T12:00:00.000Z", + "end": "2018-06-04T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2018-10-22 00:00:00", + "start": "2018-10-21T11:00:00.000Z", + "end": "2018-10-22T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T11:00:00.000Z", + "end": "2018-12-25T11:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2018-12-26 00:00:00", + "start": "2018-12-25T11:00:00.000Z", + "end": "2018-12-26T11:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/NZ-BOP-2019.json b/test/fixtures/NZ-BOP-2019.json new file mode 100644 index 000000000..6657dcafa --- /dev/null +++ b/test/fixtures/NZ-BOP-2019.json @@ -0,0 +1,101 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T11:00:00.000Z", + "end": "2019-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2019-01-02 00:00:00", + "start": "2019-01-01T11:00:00.000Z", + "end": "2019-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2019-02-06 00:00:00", + "start": "2019-02-05T11:00:00.000Z", + "end": "2019-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T12:00:00.000Z", + "end": "2019-04-19T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T12:00:00.000Z", + "end": "2019-04-21T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-04-22 00:00:00", + "start": "2019-04-21T12:00:00.000Z", + "end": "2019-04-22T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2019-04-25 00:00:00", + "start": "2019-04-24T12:00:00.000Z", + "end": "2019-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2019-06-03 00:00:00", + "start": "2019-06-02T12:00:00.000Z", + "end": "2019-06-03T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2019-10-28 00:00:00", + "start": "2019-10-27T11:00:00.000Z", + "end": "2019-10-28T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T11:00:00.000Z", + "end": "2019-12-25T11: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-25T11:00:00.000Z", + "end": "2019-12-26T11: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/NZ-BOP-2020.json b/test/fixtures/NZ-BOP-2020.json new file mode 100644 index 000000000..86f9ef48a --- /dev/null +++ b/test/fixtures/NZ-BOP-2020.json @@ -0,0 +1,121 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T11:00:00.000Z", + "end": "2020-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2020-01-02 00:00:00", + "start": "2020-01-01T11:00:00.000Z", + "end": "2020-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2020-02-06 00:00:00", + "start": "2020-02-05T11:00:00.000Z", + "end": "2020-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T12:00:00.000Z", + "end": "2020-04-10T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T12:00:00.000Z", + "end": "2020-04-12T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-04-13 00:00:00", + "start": "2020-04-12T12:00:00.000Z", + "end": "2020-04-13T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2020-04-25 00:00:00", + "start": "2020-04-24T12:00:00.000Z", + "end": "2020-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2020-04-27 00:00:00", + "start": "2020-04-26T12:00:00.000Z", + "end": "2020-04-27T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-06-01 00:00:00", + "start": "2020-05-31T12:00:00.000Z", + "end": "2020-06-01T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2020-10-26 00:00:00", + "start": "2020-10-25T11:00:00.000Z", + "end": "2020-10-26T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T11:00:00.000Z", + "end": "2020-12-25T11: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-25T11:00:00.000Z", + "end": "2020-12-26T11: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-27T11:00:00.000Z", + "end": "2020-12-28T11: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/NZ-BOP-2021.json b/test/fixtures/NZ-BOP-2021.json new file mode 100644 index 000000000..b6622958c --- /dev/null +++ b/test/fixtures/NZ-BOP-2021.json @@ -0,0 +1,151 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T11:00:00.000Z", + "end": "2021-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2021-01-02 00:00:00", + "start": "2021-01-01T11:00:00.000Z", + "end": "2021-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2021-01-04 00:00:00", + "start": "2021-01-03T11:00:00.000Z", + "end": "2021-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2021-02-06 00:00:00", + "start": "2021-02-05T11:00:00.000Z", + "end": "2021-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2021-02-08 00:00:00", + "start": "2021-02-07T11:00:00.000Z", + "end": "2021-02-08T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T11:00:00.000Z", + "end": "2021-04-02T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T11:00:00.000Z", + "end": "2021-04-04T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-04-05 00:00:00", + "start": "2021-04-04T12:00:00.000Z", + "end": "2021-04-05T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2021-04-25 00:00:00", + "start": "2021-04-24T12:00:00.000Z", + "end": "2021-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sun" + }, + { + "date": "2021-04-26 00:00:00", + "start": "2021-04-25T12:00:00.000Z", + "end": "2021-04-26T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2021-06-07 00:00:00", + "start": "2021-06-06T12:00:00.000Z", + "end": "2021-06-07T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2021-10-25 00:00:00", + "start": "2021-10-24T11:00:00.000Z", + "end": "2021-10-25T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T11:00:00.000Z", + "end": "2021-12-25T11: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-25T11:00:00.000Z", + "end": "2021-12-26T11: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-26T11:00:00.000Z", + "end": "2021-12-27T11: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-27T11:00:00.000Z", + "end": "2021-12-28T11: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/NZ-BOP-2022.json b/test/fixtures/NZ-BOP-2022.json new file mode 100644 index 000000000..651cb1aa6 --- /dev/null +++ b/test/fixtures/NZ-BOP-2022.json @@ -0,0 +1,150 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T11:00:00.000Z", + "end": "2022-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2022-01-02 00:00:00", + "start": "2022-01-01T11:00:00.000Z", + "end": "2022-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2022-01-03 00:00:00", + "start": "2022-01-02T11:00:00.000Z", + "end": "2022-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2022-01-04 00:00:00", + "start": "2022-01-03T11:00:00.000Z", + "end": "2022-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2022-02-06 00:00:00", + "start": "2022-02-05T11:00:00.000Z", + "end": "2022-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sun" + }, + { + "date": "2022-02-07 00:00:00", + "start": "2022-02-06T11:00:00.000Z", + "end": "2022-02-07T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T12:00:00.000Z", + "end": "2022-04-15T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T12:00:00.000Z", + "end": "2022-04-17T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-04-18 00:00:00", + "start": "2022-04-17T12:00:00.000Z", + "end": "2022-04-18T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2022-04-25 00:00:00", + "start": "2022-04-24T12:00:00.000Z", + "end": "2022-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-06-06 00:00:00", + "start": "2022-06-05T12:00:00.000Z", + "end": "2022-06-06T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, + { + "date": "2022-10-24 00:00:00", + "start": "2022-10-23T11:00:00.000Z", + "end": "2022-10-24T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T11:00:00.000Z", + "end": "2022-12-25T11: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-25T11:00:00.000Z", + "end": "2022-12-26T11: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-26T11:00:00.000Z", + "end": "2022-12-27T11: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/NZ-BOP-2023.json b/test/fixtures/NZ-BOP-2023.json new file mode 100644 index 000000000..bb159b944 --- /dev/null +++ b/test/fixtures/NZ-BOP-2023.json @@ -0,0 +1,120 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T11:00:00.000Z", + "end": "2023-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T11:00:00.000Z", + "end": "2023-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2023-01-03 00:00:00", + "start": "2023-01-02T11:00:00.000Z", + "end": "2023-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2023-02-06 00:00:00", + "start": "2023-02-05T11:00:00.000Z", + "end": "2023-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T12:00:00.000Z", + "end": "2023-04-07T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T12:00:00.000Z", + "end": "2023-04-09T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-04-10 00:00:00", + "start": "2023-04-09T12:00:00.000Z", + "end": "2023-04-10T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2023-04-25 00:00:00", + "start": "2023-04-24T12:00:00.000Z", + "end": "2023-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2023-06-05 00:00:00", + "start": "2023-06-04T12:00:00.000Z", + "end": "2023-06-05T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, + { + "date": "2023-10-23 00:00:00", + "start": "2023-10-22T11:00:00.000Z", + "end": "2023-10-23T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T11:00:00.000Z", + "end": "2023-12-25T11: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-25T11:00:00.000Z", + "end": "2023-12-26T11: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/NZ-BOP-2024.json b/test/fixtures/NZ-BOP-2024.json new file mode 100644 index 000000000..bc12e9a14 --- /dev/null +++ b/test/fixtures/NZ-BOP-2024.json @@ -0,0 +1,110 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T11:00:00.000Z", + "end": "2024-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2024-01-02 00:00:00", + "start": "2024-01-01T11:00:00.000Z", + "end": "2024-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2024-02-06 00:00:00", + "start": "2024-02-05T11:00:00.000Z", + "end": "2024-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T11:00:00.000Z", + "end": "2024-03-29T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T11:00:00.000Z", + "end": "2024-03-31T11:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-04-01 00:00:00", + "start": "2024-03-31T11:00:00.000Z", + "end": "2024-04-01T11:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2024-04-25 00:00:00", + "start": "2024-04-24T12:00:00.000Z", + "end": "2024-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2024-06-03 00:00:00", + "start": "2024-06-02T12:00:00.000Z", + "end": "2024-06-03T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, + { + "date": "2024-10-28 00:00:00", + "start": "2024-10-27T11:00:00.000Z", + "end": "2024-10-28T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T11:00:00.000Z", + "end": "2024-12-25T11: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-25T11:00:00.000Z", + "end": "2024-12-26T11: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/NZ-BOP-2025.json b/test/fixtures/NZ-BOP-2025.json new file mode 100644 index 000000000..692ba6a76 --- /dev/null +++ b/test/fixtures/NZ-BOP-2025.json @@ -0,0 +1,110 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T11:00:00.000Z", + "end": "2025-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2025-01-02 00:00:00", + "start": "2025-01-01T11:00:00.000Z", + "end": "2025-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2025-02-06 00:00:00", + "start": "2025-02-05T11:00:00.000Z", + "end": "2025-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T12:00:00.000Z", + "end": "2025-04-18T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T12:00:00.000Z", + "end": "2025-04-20T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-04-21 00:00:00", + "start": "2025-04-20T12:00:00.000Z", + "end": "2025-04-21T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2025-04-25 00:00:00", + "start": "2025-04-24T12:00:00.000Z", + "end": "2025-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2025-06-02 00:00:00", + "start": "2025-06-01T12:00:00.000Z", + "end": "2025-06-02T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, + { + "date": "2025-10-27 00:00:00", + "start": "2025-10-26T11:00:00.000Z", + "end": "2025-10-27T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T11:00:00.000Z", + "end": "2025-12-25T11: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-25T11:00:00.000Z", + "end": "2025-12-26T11: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 diff --git a/test/fixtures/NZ-CAN-2022.json b/test/fixtures/NZ-CAN-2022.json index 36a23e670..c3ae8c2e2 100644 --- a/test/fixtures/NZ-CAN-2022.json +++ b/test/fixtures/NZ-CAN-2022.json @@ -101,6 +101,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, { "date": "2022-10-24 00:00:00", "start": "2022-10-23T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-2023.json b/test/fixtures/NZ-CAN-2023.json index d731f4fc0..d98d153aa 100644 --- a/test/fixtures/NZ-CAN-2023.json +++ b/test/fixtures/NZ-CAN-2023.json @@ -81,6 +81,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, { "date": "2023-10-23 00:00:00", "start": "2023-10-22T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-2024.json b/test/fixtures/NZ-CAN-2024.json index 79fa00ff5..8268bb17f 100644 --- a/test/fixtures/NZ-CAN-2024.json +++ b/test/fixtures/NZ-CAN-2024.json @@ -71,6 +71,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, { "date": "2024-10-28 00:00:00", "start": "2024-10-27T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-2025.json b/test/fixtures/NZ-CAN-2025.json index 2ade45d7e..432c9ec38 100644 --- a/test/fixtures/NZ-CAN-2025.json +++ b/test/fixtures/NZ-CAN-2025.json @@ -71,6 +71,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, { "date": "2025-10-27 00:00:00", "start": "2025-10-26T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-S-2022.json b/test/fixtures/NZ-CAN-S-2022.json index ce77ec7d0..a0f5567c6 100644 --- a/test/fixtures/NZ-CAN-S-2022.json +++ b/test/fixtures/NZ-CAN-S-2022.json @@ -101,6 +101,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, { "date": "2022-09-26 00:00:00", "start": "2022-09-25T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-S-2023.json b/test/fixtures/NZ-CAN-S-2023.json index 7e58f0853..e29748954 100644 --- a/test/fixtures/NZ-CAN-S-2023.json +++ b/test/fixtures/NZ-CAN-S-2023.json @@ -81,6 +81,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, { "date": "2023-09-25 00:00:00", "start": "2023-09-24T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-S-2024.json b/test/fixtures/NZ-CAN-S-2024.json index 272cf9829..4ab334eeb 100644 --- a/test/fixtures/NZ-CAN-S-2024.json +++ b/test/fixtures/NZ-CAN-S-2024.json @@ -71,6 +71,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, { "date": "2024-09-23 00:00:00", "start": "2024-09-22T12:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-S-2025.json b/test/fixtures/NZ-CAN-S-2025.json index 2bf118828..71d7d86d1 100644 --- a/test/fixtures/NZ-CAN-S-2025.json +++ b/test/fixtures/NZ-CAN-S-2025.json @@ -71,6 +71,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, { "date": "2025-09-22 00:00:00", "start": "2025-09-21T12:00:00.000Z", diff --git a/test/fixtures/NZ-CIT-2022.json b/test/fixtures/NZ-CIT-2022.json index 693053fbe..ec52c9b2b 100644 --- a/test/fixtures/NZ-CIT-2022.json +++ b/test/fixtures/NZ-CIT-2022.json @@ -101,6 +101,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, { "date": "2022-10-24 00:00:00", "start": "2022-10-23T11:00:00.000Z", diff --git a/test/fixtures/NZ-CIT-2023.json b/test/fixtures/NZ-CIT-2023.json index f77b9e17d..62bfb62c1 100644 --- a/test/fixtures/NZ-CIT-2023.json +++ b/test/fixtures/NZ-CIT-2023.json @@ -81,6 +81,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, { "date": "2023-10-23 00:00:00", "start": "2023-10-22T11:00:00.000Z", diff --git a/test/fixtures/NZ-CIT-2024.json b/test/fixtures/NZ-CIT-2024.json index edea7dff9..9f911d203 100644 --- a/test/fixtures/NZ-CIT-2024.json +++ b/test/fixtures/NZ-CIT-2024.json @@ -71,6 +71,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, { "date": "2024-10-28 00:00:00", "start": "2024-10-27T11:00:00.000Z", diff --git a/test/fixtures/NZ-CIT-2025.json b/test/fixtures/NZ-CIT-2025.json index 1ceb358eb..28576325e 100644 --- a/test/fixtures/NZ-CIT-2025.json +++ b/test/fixtures/NZ-CIT-2025.json @@ -71,6 +71,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, { "date": "2025-10-27 00:00:00", "start": "2025-10-26T11:00:00.000Z", diff --git a/test/fixtures/NZ-GIS-2015.json b/test/fixtures/NZ-GIS-2015.json new file mode 100644 index 000000000..c0a06d0bd --- /dev/null +++ b/test/fixtures/NZ-GIS-2015.json @@ -0,0 +1,121 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T11:00:00.000Z", + "end": "2015-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2015-01-02 00:00:00", + "start": "2015-01-01T11:00:00.000Z", + "end": "2015-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2015-02-06 00:00:00", + "start": "2015-02-05T11:00:00.000Z", + "end": "2015-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T11:00:00.000Z", + "end": "2015-04-03T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T11:00:00.000Z", + "end": "2015-04-05T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-04-06 00:00:00", + "start": "2015-04-05T12:00:00.000Z", + "end": "2015-04-06T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2015-04-25 00:00:00", + "start": "2015-04-24T12:00:00.000Z", + "end": "2015-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2015-04-27 00:00:00", + "start": "2015-04-26T12:00:00.000Z", + "end": "2015-04-27T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-06-01 00:00:00", + "start": "2015-05-31T12:00:00.000Z", + "end": "2015-06-01T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2015-10-26 00:00:00", + "start": "2015-10-25T11:00:00.000Z", + "end": "2015-10-26T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T11:00:00.000Z", + "end": "2015-12-25T11: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": "2015-12-26 00:00:00", + "start": "2015-12-25T11:00:00.000Z", + "end": "2015-12-26T11: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": "2015-12-28 00:00:00", + "start": "2015-12-27T11:00:00.000Z", + "end": "2015-12-28T11: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/NZ-GIS-2016.json b/test/fixtures/NZ-GIS-2016.json new file mode 100644 index 000000000..b7b23d51f --- /dev/null +++ b/test/fixtures/NZ-GIS-2016.json @@ -0,0 +1,131 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T11:00:00.000Z", + "end": "2016-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2016-01-02 00:00:00", + "start": "2016-01-01T11:00:00.000Z", + "end": "2016-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2016-01-04 00:00:00", + "start": "2016-01-03T11:00:00.000Z", + "end": "2016-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2016-02-06 00:00:00", + "start": "2016-02-05T11:00:00.000Z", + "end": "2016-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2016-02-08 00:00:00", + "start": "2016-02-07T11:00:00.000Z", + "end": "2016-02-08T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T11:00:00.000Z", + "end": "2016-03-25T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T11:00:00.000Z", + "end": "2016-03-27T11:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-03-28 00:00:00", + "start": "2016-03-27T11:00:00.000Z", + "end": "2016-03-28T11:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2016-04-25 00:00:00", + "start": "2016-04-24T12:00:00.000Z", + "end": "2016-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2016-06-06 00:00:00", + "start": "2016-06-05T12:00:00.000Z", + "end": "2016-06-06T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2016-10-24 00:00:00", + "start": "2016-10-23T11:00:00.000Z", + "end": "2016-10-24T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T11:00:00.000Z", + "end": "2016-12-25T11: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": "2016-12-26 00:00:00", + "start": "2016-12-25T11:00:00.000Z", + "end": "2016-12-26T11: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": "2016-12-27 00:00:00", + "start": "2016-12-26T11:00:00.000Z", + "end": "2016-12-27T11: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/NZ-GIS-2017.json b/test/fixtures/NZ-GIS-2017.json new file mode 100644 index 000000000..4c815ea98 --- /dev/null +++ b/test/fixtures/NZ-GIS-2017.json @@ -0,0 +1,111 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T11:00:00.000Z", + "end": "2017-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T11:00:00.000Z", + "end": "2017-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2017-01-03 00:00:00", + "start": "2017-01-02T11:00:00.000Z", + "end": "2017-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2017-02-06 00:00:00", + "start": "2017-02-05T11:00:00.000Z", + "end": "2017-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T12:00:00.000Z", + "end": "2017-04-14T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T12:00:00.000Z", + "end": "2017-04-16T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-04-17 00:00:00", + "start": "2017-04-16T12:00:00.000Z", + "end": "2017-04-17T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2017-04-25 00:00:00", + "start": "2017-04-24T12:00:00.000Z", + "end": "2017-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2017-06-05 00:00:00", + "start": "2017-06-04T12:00:00.000Z", + "end": "2017-06-05T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2017-10-23 00:00:00", + "start": "2017-10-22T11:00:00.000Z", + "end": "2017-10-23T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T11:00:00.000Z", + "end": "2017-12-25T11: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": "2017-12-26 00:00:00", + "start": "2017-12-25T11:00:00.000Z", + "end": "2017-12-26T11: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/NZ-GIS-2018.json b/test/fixtures/NZ-GIS-2018.json new file mode 100644 index 000000000..c22e3531d --- /dev/null +++ b/test/fixtures/NZ-GIS-2018.json @@ -0,0 +1,101 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T11:00:00.000Z", + "end": "2018-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2018-01-02 00:00:00", + "start": "2018-01-01T11:00:00.000Z", + "end": "2018-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2018-02-06 00:00:00", + "start": "2018-02-05T11:00:00.000Z", + "end": "2018-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T11:00:00.000Z", + "end": "2018-03-30T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T11:00:00.000Z", + "end": "2018-04-01T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-04-02 00:00:00", + "start": "2018-04-01T12:00:00.000Z", + "end": "2018-04-02T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2018-04-25 00:00:00", + "start": "2018-04-24T12:00:00.000Z", + "end": "2018-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2018-06-04 00:00:00", + "start": "2018-06-03T12:00:00.000Z", + "end": "2018-06-04T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2018-10-22 00:00:00", + "start": "2018-10-21T11:00:00.000Z", + "end": "2018-10-22T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T11:00:00.000Z", + "end": "2018-12-25T11:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2018-12-26 00:00:00", + "start": "2018-12-25T11:00:00.000Z", + "end": "2018-12-26T11:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/NZ-GIS-2019.json b/test/fixtures/NZ-GIS-2019.json new file mode 100644 index 000000000..6657dcafa --- /dev/null +++ b/test/fixtures/NZ-GIS-2019.json @@ -0,0 +1,101 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T11:00:00.000Z", + "end": "2019-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2019-01-02 00:00:00", + "start": "2019-01-01T11:00:00.000Z", + "end": "2019-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2019-02-06 00:00:00", + "start": "2019-02-05T11:00:00.000Z", + "end": "2019-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T12:00:00.000Z", + "end": "2019-04-19T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T12:00:00.000Z", + "end": "2019-04-21T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-04-22 00:00:00", + "start": "2019-04-21T12:00:00.000Z", + "end": "2019-04-22T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2019-04-25 00:00:00", + "start": "2019-04-24T12:00:00.000Z", + "end": "2019-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2019-06-03 00:00:00", + "start": "2019-06-02T12:00:00.000Z", + "end": "2019-06-03T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2019-10-28 00:00:00", + "start": "2019-10-27T11:00:00.000Z", + "end": "2019-10-28T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T11:00:00.000Z", + "end": "2019-12-25T11: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-25T11:00:00.000Z", + "end": "2019-12-26T11: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/NZ-GIS-2020.json b/test/fixtures/NZ-GIS-2020.json new file mode 100644 index 000000000..86f9ef48a --- /dev/null +++ b/test/fixtures/NZ-GIS-2020.json @@ -0,0 +1,121 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T11:00:00.000Z", + "end": "2020-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2020-01-02 00:00:00", + "start": "2020-01-01T11:00:00.000Z", + "end": "2020-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2020-02-06 00:00:00", + "start": "2020-02-05T11:00:00.000Z", + "end": "2020-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T12:00:00.000Z", + "end": "2020-04-10T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T12:00:00.000Z", + "end": "2020-04-12T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-04-13 00:00:00", + "start": "2020-04-12T12:00:00.000Z", + "end": "2020-04-13T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2020-04-25 00:00:00", + "start": "2020-04-24T12:00:00.000Z", + "end": "2020-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2020-04-27 00:00:00", + "start": "2020-04-26T12:00:00.000Z", + "end": "2020-04-27T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-06-01 00:00:00", + "start": "2020-05-31T12:00:00.000Z", + "end": "2020-06-01T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2020-10-26 00:00:00", + "start": "2020-10-25T11:00:00.000Z", + "end": "2020-10-26T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T11:00:00.000Z", + "end": "2020-12-25T11: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-25T11:00:00.000Z", + "end": "2020-12-26T11: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-27T11:00:00.000Z", + "end": "2020-12-28T11: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/NZ-GIS-2021.json b/test/fixtures/NZ-GIS-2021.json new file mode 100644 index 000000000..b6622958c --- /dev/null +++ b/test/fixtures/NZ-GIS-2021.json @@ -0,0 +1,151 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T11:00:00.000Z", + "end": "2021-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2021-01-02 00:00:00", + "start": "2021-01-01T11:00:00.000Z", + "end": "2021-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2021-01-04 00:00:00", + "start": "2021-01-03T11:00:00.000Z", + "end": "2021-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2021-02-06 00:00:00", + "start": "2021-02-05T11:00:00.000Z", + "end": "2021-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2021-02-08 00:00:00", + "start": "2021-02-07T11:00:00.000Z", + "end": "2021-02-08T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T11:00:00.000Z", + "end": "2021-04-02T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T11:00:00.000Z", + "end": "2021-04-04T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-04-05 00:00:00", + "start": "2021-04-04T12:00:00.000Z", + "end": "2021-04-05T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2021-04-25 00:00:00", + "start": "2021-04-24T12:00:00.000Z", + "end": "2021-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sun" + }, + { + "date": "2021-04-26 00:00:00", + "start": "2021-04-25T12:00:00.000Z", + "end": "2021-04-26T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2021-06-07 00:00:00", + "start": "2021-06-06T12:00:00.000Z", + "end": "2021-06-07T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2021-10-25 00:00:00", + "start": "2021-10-24T11:00:00.000Z", + "end": "2021-10-25T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T11:00:00.000Z", + "end": "2021-12-25T11: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-25T11:00:00.000Z", + "end": "2021-12-26T11: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-26T11:00:00.000Z", + "end": "2021-12-27T11: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-27T11:00:00.000Z", + "end": "2021-12-28T11: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/NZ-GIS-2022.json b/test/fixtures/NZ-GIS-2022.json new file mode 100644 index 000000000..651cb1aa6 --- /dev/null +++ b/test/fixtures/NZ-GIS-2022.json @@ -0,0 +1,150 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T11:00:00.000Z", + "end": "2022-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2022-01-02 00:00:00", + "start": "2022-01-01T11:00:00.000Z", + "end": "2022-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2022-01-03 00:00:00", + "start": "2022-01-02T11:00:00.000Z", + "end": "2022-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2022-01-04 00:00:00", + "start": "2022-01-03T11:00:00.000Z", + "end": "2022-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2022-02-06 00:00:00", + "start": "2022-02-05T11:00:00.000Z", + "end": "2022-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sun" + }, + { + "date": "2022-02-07 00:00:00", + "start": "2022-02-06T11:00:00.000Z", + "end": "2022-02-07T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T12:00:00.000Z", + "end": "2022-04-15T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T12:00:00.000Z", + "end": "2022-04-17T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-04-18 00:00:00", + "start": "2022-04-17T12:00:00.000Z", + "end": "2022-04-18T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2022-04-25 00:00:00", + "start": "2022-04-24T12:00:00.000Z", + "end": "2022-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-06-06 00:00:00", + "start": "2022-06-05T12:00:00.000Z", + "end": "2022-06-06T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, + { + "date": "2022-10-24 00:00:00", + "start": "2022-10-23T11:00:00.000Z", + "end": "2022-10-24T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T11:00:00.000Z", + "end": "2022-12-25T11: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-25T11:00:00.000Z", + "end": "2022-12-26T11: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-26T11:00:00.000Z", + "end": "2022-12-27T11: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/NZ-GIS-2023.json b/test/fixtures/NZ-GIS-2023.json new file mode 100644 index 000000000..bb159b944 --- /dev/null +++ b/test/fixtures/NZ-GIS-2023.json @@ -0,0 +1,120 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T11:00:00.000Z", + "end": "2023-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T11:00:00.000Z", + "end": "2023-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2023-01-03 00:00:00", + "start": "2023-01-02T11:00:00.000Z", + "end": "2023-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2023-02-06 00:00:00", + "start": "2023-02-05T11:00:00.000Z", + "end": "2023-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T12:00:00.000Z", + "end": "2023-04-07T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T12:00:00.000Z", + "end": "2023-04-09T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-04-10 00:00:00", + "start": "2023-04-09T12:00:00.000Z", + "end": "2023-04-10T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2023-04-25 00:00:00", + "start": "2023-04-24T12:00:00.000Z", + "end": "2023-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2023-06-05 00:00:00", + "start": "2023-06-04T12:00:00.000Z", + "end": "2023-06-05T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, + { + "date": "2023-10-23 00:00:00", + "start": "2023-10-22T11:00:00.000Z", + "end": "2023-10-23T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T11:00:00.000Z", + "end": "2023-12-25T11: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-25T11:00:00.000Z", + "end": "2023-12-26T11: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/NZ-GIS-2024.json b/test/fixtures/NZ-GIS-2024.json new file mode 100644 index 000000000..bc12e9a14 --- /dev/null +++ b/test/fixtures/NZ-GIS-2024.json @@ -0,0 +1,110 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T11:00:00.000Z", + "end": "2024-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2024-01-02 00:00:00", + "start": "2024-01-01T11:00:00.000Z", + "end": "2024-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2024-02-06 00:00:00", + "start": "2024-02-05T11:00:00.000Z", + "end": "2024-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T11:00:00.000Z", + "end": "2024-03-29T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T11:00:00.000Z", + "end": "2024-03-31T11:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-04-01 00:00:00", + "start": "2024-03-31T11:00:00.000Z", + "end": "2024-04-01T11:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2024-04-25 00:00:00", + "start": "2024-04-24T12:00:00.000Z", + "end": "2024-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2024-06-03 00:00:00", + "start": "2024-06-02T12:00:00.000Z", + "end": "2024-06-03T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, + { + "date": "2024-10-28 00:00:00", + "start": "2024-10-27T11:00:00.000Z", + "end": "2024-10-28T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T11:00:00.000Z", + "end": "2024-12-25T11: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-25T11:00:00.000Z", + "end": "2024-12-26T11: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/NZ-GIS-2025.json b/test/fixtures/NZ-GIS-2025.json new file mode 100644 index 000000000..692ba6a76 --- /dev/null +++ b/test/fixtures/NZ-GIS-2025.json @@ -0,0 +1,110 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T11:00:00.000Z", + "end": "2025-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2025-01-02 00:00:00", + "start": "2025-01-01T11:00:00.000Z", + "end": "2025-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2025-02-06 00:00:00", + "start": "2025-02-05T11:00:00.000Z", + "end": "2025-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T12:00:00.000Z", + "end": "2025-04-18T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T12:00:00.000Z", + "end": "2025-04-20T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-04-21 00:00:00", + "start": "2025-04-20T12:00:00.000Z", + "end": "2025-04-21T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2025-04-25 00:00:00", + "start": "2025-04-24T12:00:00.000Z", + "end": "2025-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2025-06-02 00:00:00", + "start": "2025-06-01T12:00:00.000Z", + "end": "2025-06-02T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, + { + "date": "2025-10-27 00:00:00", + "start": "2025-10-26T11:00:00.000Z", + "end": "2025-10-27T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T11:00:00.000Z", + "end": "2025-12-25T11: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-25T11:00:00.000Z", + "end": "2025-12-26T11: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 diff --git a/test/fixtures/NZ-HKB-2022.json b/test/fixtures/NZ-HKB-2022.json index 2ef46db5b..35f35c40f 100644 --- a/test/fixtures/NZ-HKB-2022.json +++ b/test/fixtures/NZ-HKB-2022.json @@ -101,6 +101,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, { "date": "2022-10-21 00:00:00", "start": "2022-10-20T11:00:00.000Z", diff --git a/test/fixtures/NZ-HKB-2023.json b/test/fixtures/NZ-HKB-2023.json index 94e241b37..224322642 100644 --- a/test/fixtures/NZ-HKB-2023.json +++ b/test/fixtures/NZ-HKB-2023.json @@ -81,6 +81,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, { "date": "2023-10-20 00:00:00", "start": "2023-10-19T11:00:00.000Z", diff --git a/test/fixtures/NZ-HKB-2024.json b/test/fixtures/NZ-HKB-2024.json index 08e00d66a..6929b87b0 100644 --- a/test/fixtures/NZ-HKB-2024.json +++ b/test/fixtures/NZ-HKB-2024.json @@ -71,6 +71,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, { "date": "2024-10-25 00:00:00", "start": "2024-10-24T11:00:00.000Z", diff --git a/test/fixtures/NZ-HKB-2025.json b/test/fixtures/NZ-HKB-2025.json index 2d908e64d..6b0880f09 100644 --- a/test/fixtures/NZ-HKB-2025.json +++ b/test/fixtures/NZ-HKB-2025.json @@ -71,6 +71,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, { "date": "2025-10-24 00:00:00", "start": "2025-10-23T11:00:00.000Z", diff --git a/test/fixtures/NZ-MBH-2022.json b/test/fixtures/NZ-MBH-2022.json index 3b9b1f7bb..d0c98bdb7 100644 --- a/test/fixtures/NZ-MBH-2022.json +++ b/test/fixtures/NZ-MBH-2022.json @@ -101,6 +101,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, { "date": "2022-10-24 00:00:00", "start": "2022-10-23T11:00:00.000Z", diff --git a/test/fixtures/NZ-MBH-2023.json b/test/fixtures/NZ-MBH-2023.json index dd4818642..220af9c0e 100644 --- a/test/fixtures/NZ-MBH-2023.json +++ b/test/fixtures/NZ-MBH-2023.json @@ -81,6 +81,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, { "date": "2023-10-23 00:00:00", "start": "2023-10-22T11:00:00.000Z", diff --git a/test/fixtures/NZ-MBH-2024.json b/test/fixtures/NZ-MBH-2024.json index 99a23bdc8..765462f6b 100644 --- a/test/fixtures/NZ-MBH-2024.json +++ b/test/fixtures/NZ-MBH-2024.json @@ -71,6 +71,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, { "date": "2024-10-28 00:00:00", "start": "2024-10-27T11:00:00.000Z", diff --git a/test/fixtures/NZ-MBH-2025.json b/test/fixtures/NZ-MBH-2025.json index e3c9d93d1..118413fea 100644 --- a/test/fixtures/NZ-MBH-2025.json +++ b/test/fixtures/NZ-MBH-2025.json @@ -71,6 +71,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, { "date": "2025-10-27 00:00:00", "start": "2025-10-26T11:00:00.000Z", diff --git a/test/fixtures/NZ-MWT-2015.json b/test/fixtures/NZ-MWT-2015.json new file mode 100644 index 000000000..c0a06d0bd --- /dev/null +++ b/test/fixtures/NZ-MWT-2015.json @@ -0,0 +1,121 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T11:00:00.000Z", + "end": "2015-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2015-01-02 00:00:00", + "start": "2015-01-01T11:00:00.000Z", + "end": "2015-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2015-02-06 00:00:00", + "start": "2015-02-05T11:00:00.000Z", + "end": "2015-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T11:00:00.000Z", + "end": "2015-04-03T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T11:00:00.000Z", + "end": "2015-04-05T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-04-06 00:00:00", + "start": "2015-04-05T12:00:00.000Z", + "end": "2015-04-06T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2015-04-25 00:00:00", + "start": "2015-04-24T12:00:00.000Z", + "end": "2015-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2015-04-27 00:00:00", + "start": "2015-04-26T12:00:00.000Z", + "end": "2015-04-27T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-06-01 00:00:00", + "start": "2015-05-31T12:00:00.000Z", + "end": "2015-06-01T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2015-10-26 00:00:00", + "start": "2015-10-25T11:00:00.000Z", + "end": "2015-10-26T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T11:00:00.000Z", + "end": "2015-12-25T11: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": "2015-12-26 00:00:00", + "start": "2015-12-25T11:00:00.000Z", + "end": "2015-12-26T11: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": "2015-12-28 00:00:00", + "start": "2015-12-27T11:00:00.000Z", + "end": "2015-12-28T11: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/NZ-MWT-2016.json b/test/fixtures/NZ-MWT-2016.json new file mode 100644 index 000000000..b7b23d51f --- /dev/null +++ b/test/fixtures/NZ-MWT-2016.json @@ -0,0 +1,131 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T11:00:00.000Z", + "end": "2016-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2016-01-02 00:00:00", + "start": "2016-01-01T11:00:00.000Z", + "end": "2016-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2016-01-04 00:00:00", + "start": "2016-01-03T11:00:00.000Z", + "end": "2016-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2016-02-06 00:00:00", + "start": "2016-02-05T11:00:00.000Z", + "end": "2016-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2016-02-08 00:00:00", + "start": "2016-02-07T11:00:00.000Z", + "end": "2016-02-08T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T11:00:00.000Z", + "end": "2016-03-25T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T11:00:00.000Z", + "end": "2016-03-27T11:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-03-28 00:00:00", + "start": "2016-03-27T11:00:00.000Z", + "end": "2016-03-28T11:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2016-04-25 00:00:00", + "start": "2016-04-24T12:00:00.000Z", + "end": "2016-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2016-06-06 00:00:00", + "start": "2016-06-05T12:00:00.000Z", + "end": "2016-06-06T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2016-10-24 00:00:00", + "start": "2016-10-23T11:00:00.000Z", + "end": "2016-10-24T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T11:00:00.000Z", + "end": "2016-12-25T11: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": "2016-12-26 00:00:00", + "start": "2016-12-25T11:00:00.000Z", + "end": "2016-12-26T11: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": "2016-12-27 00:00:00", + "start": "2016-12-26T11:00:00.000Z", + "end": "2016-12-27T11: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/NZ-MWT-2017.json b/test/fixtures/NZ-MWT-2017.json new file mode 100644 index 000000000..4c815ea98 --- /dev/null +++ b/test/fixtures/NZ-MWT-2017.json @@ -0,0 +1,111 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T11:00:00.000Z", + "end": "2017-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T11:00:00.000Z", + "end": "2017-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2017-01-03 00:00:00", + "start": "2017-01-02T11:00:00.000Z", + "end": "2017-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2017-02-06 00:00:00", + "start": "2017-02-05T11:00:00.000Z", + "end": "2017-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T12:00:00.000Z", + "end": "2017-04-14T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T12:00:00.000Z", + "end": "2017-04-16T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-04-17 00:00:00", + "start": "2017-04-16T12:00:00.000Z", + "end": "2017-04-17T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2017-04-25 00:00:00", + "start": "2017-04-24T12:00:00.000Z", + "end": "2017-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2017-06-05 00:00:00", + "start": "2017-06-04T12:00:00.000Z", + "end": "2017-06-05T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2017-10-23 00:00:00", + "start": "2017-10-22T11:00:00.000Z", + "end": "2017-10-23T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T11:00:00.000Z", + "end": "2017-12-25T11: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": "2017-12-26 00:00:00", + "start": "2017-12-25T11:00:00.000Z", + "end": "2017-12-26T11: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/NZ-MWT-2018.json b/test/fixtures/NZ-MWT-2018.json new file mode 100644 index 000000000..c22e3531d --- /dev/null +++ b/test/fixtures/NZ-MWT-2018.json @@ -0,0 +1,101 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T11:00:00.000Z", + "end": "2018-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2018-01-02 00:00:00", + "start": "2018-01-01T11:00:00.000Z", + "end": "2018-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2018-02-06 00:00:00", + "start": "2018-02-05T11:00:00.000Z", + "end": "2018-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T11:00:00.000Z", + "end": "2018-03-30T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T11:00:00.000Z", + "end": "2018-04-01T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-04-02 00:00:00", + "start": "2018-04-01T12:00:00.000Z", + "end": "2018-04-02T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2018-04-25 00:00:00", + "start": "2018-04-24T12:00:00.000Z", + "end": "2018-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2018-06-04 00:00:00", + "start": "2018-06-03T12:00:00.000Z", + "end": "2018-06-04T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2018-10-22 00:00:00", + "start": "2018-10-21T11:00:00.000Z", + "end": "2018-10-22T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T11:00:00.000Z", + "end": "2018-12-25T11:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2018-12-26 00:00:00", + "start": "2018-12-25T11:00:00.000Z", + "end": "2018-12-26T11:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/NZ-MWT-2019.json b/test/fixtures/NZ-MWT-2019.json new file mode 100644 index 000000000..6657dcafa --- /dev/null +++ b/test/fixtures/NZ-MWT-2019.json @@ -0,0 +1,101 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T11:00:00.000Z", + "end": "2019-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2019-01-02 00:00:00", + "start": "2019-01-01T11:00:00.000Z", + "end": "2019-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2019-02-06 00:00:00", + "start": "2019-02-05T11:00:00.000Z", + "end": "2019-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T12:00:00.000Z", + "end": "2019-04-19T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T12:00:00.000Z", + "end": "2019-04-21T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-04-22 00:00:00", + "start": "2019-04-21T12:00:00.000Z", + "end": "2019-04-22T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2019-04-25 00:00:00", + "start": "2019-04-24T12:00:00.000Z", + "end": "2019-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2019-06-03 00:00:00", + "start": "2019-06-02T12:00:00.000Z", + "end": "2019-06-03T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2019-10-28 00:00:00", + "start": "2019-10-27T11:00:00.000Z", + "end": "2019-10-28T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T11:00:00.000Z", + "end": "2019-12-25T11: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-25T11:00:00.000Z", + "end": "2019-12-26T11: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/NZ-MWT-2020.json b/test/fixtures/NZ-MWT-2020.json new file mode 100644 index 000000000..86f9ef48a --- /dev/null +++ b/test/fixtures/NZ-MWT-2020.json @@ -0,0 +1,121 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T11:00:00.000Z", + "end": "2020-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2020-01-02 00:00:00", + "start": "2020-01-01T11:00:00.000Z", + "end": "2020-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2020-02-06 00:00:00", + "start": "2020-02-05T11:00:00.000Z", + "end": "2020-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T12:00:00.000Z", + "end": "2020-04-10T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T12:00:00.000Z", + "end": "2020-04-12T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-04-13 00:00:00", + "start": "2020-04-12T12:00:00.000Z", + "end": "2020-04-13T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2020-04-25 00:00:00", + "start": "2020-04-24T12:00:00.000Z", + "end": "2020-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2020-04-27 00:00:00", + "start": "2020-04-26T12:00:00.000Z", + "end": "2020-04-27T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-06-01 00:00:00", + "start": "2020-05-31T12:00:00.000Z", + "end": "2020-06-01T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2020-10-26 00:00:00", + "start": "2020-10-25T11:00:00.000Z", + "end": "2020-10-26T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T11:00:00.000Z", + "end": "2020-12-25T11: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-25T11:00:00.000Z", + "end": "2020-12-26T11: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-27T11:00:00.000Z", + "end": "2020-12-28T11: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/NZ-MWT-2021.json b/test/fixtures/NZ-MWT-2021.json new file mode 100644 index 000000000..b6622958c --- /dev/null +++ b/test/fixtures/NZ-MWT-2021.json @@ -0,0 +1,151 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T11:00:00.000Z", + "end": "2021-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2021-01-02 00:00:00", + "start": "2021-01-01T11:00:00.000Z", + "end": "2021-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2021-01-04 00:00:00", + "start": "2021-01-03T11:00:00.000Z", + "end": "2021-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2021-02-06 00:00:00", + "start": "2021-02-05T11:00:00.000Z", + "end": "2021-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2021-02-08 00:00:00", + "start": "2021-02-07T11:00:00.000Z", + "end": "2021-02-08T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T11:00:00.000Z", + "end": "2021-04-02T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T11:00:00.000Z", + "end": "2021-04-04T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-04-05 00:00:00", + "start": "2021-04-04T12:00:00.000Z", + "end": "2021-04-05T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2021-04-25 00:00:00", + "start": "2021-04-24T12:00:00.000Z", + "end": "2021-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sun" + }, + { + "date": "2021-04-26 00:00:00", + "start": "2021-04-25T12:00:00.000Z", + "end": "2021-04-26T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2021-06-07 00:00:00", + "start": "2021-06-06T12:00:00.000Z", + "end": "2021-06-07T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2021-10-25 00:00:00", + "start": "2021-10-24T11:00:00.000Z", + "end": "2021-10-25T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T11:00:00.000Z", + "end": "2021-12-25T11: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-25T11:00:00.000Z", + "end": "2021-12-26T11: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-26T11:00:00.000Z", + "end": "2021-12-27T11: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-27T11:00:00.000Z", + "end": "2021-12-28T11: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/NZ-MWT-2022.json b/test/fixtures/NZ-MWT-2022.json new file mode 100644 index 000000000..651cb1aa6 --- /dev/null +++ b/test/fixtures/NZ-MWT-2022.json @@ -0,0 +1,150 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T11:00:00.000Z", + "end": "2022-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2022-01-02 00:00:00", + "start": "2022-01-01T11:00:00.000Z", + "end": "2022-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2022-01-03 00:00:00", + "start": "2022-01-02T11:00:00.000Z", + "end": "2022-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2022-01-04 00:00:00", + "start": "2022-01-03T11:00:00.000Z", + "end": "2022-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2022-02-06 00:00:00", + "start": "2022-02-05T11:00:00.000Z", + "end": "2022-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sun" + }, + { + "date": "2022-02-07 00:00:00", + "start": "2022-02-06T11:00:00.000Z", + "end": "2022-02-07T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T12:00:00.000Z", + "end": "2022-04-15T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T12:00:00.000Z", + "end": "2022-04-17T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-04-18 00:00:00", + "start": "2022-04-17T12:00:00.000Z", + "end": "2022-04-18T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2022-04-25 00:00:00", + "start": "2022-04-24T12:00:00.000Z", + "end": "2022-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-06-06 00:00:00", + "start": "2022-06-05T12:00:00.000Z", + "end": "2022-06-06T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, + { + "date": "2022-10-24 00:00:00", + "start": "2022-10-23T11:00:00.000Z", + "end": "2022-10-24T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T11:00:00.000Z", + "end": "2022-12-25T11: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-25T11:00:00.000Z", + "end": "2022-12-26T11: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-26T11:00:00.000Z", + "end": "2022-12-27T11: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/NZ-MWT-2023.json b/test/fixtures/NZ-MWT-2023.json new file mode 100644 index 000000000..bb159b944 --- /dev/null +++ b/test/fixtures/NZ-MWT-2023.json @@ -0,0 +1,120 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T11:00:00.000Z", + "end": "2023-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T11:00:00.000Z", + "end": "2023-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2023-01-03 00:00:00", + "start": "2023-01-02T11:00:00.000Z", + "end": "2023-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2023-02-06 00:00:00", + "start": "2023-02-05T11:00:00.000Z", + "end": "2023-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T12:00:00.000Z", + "end": "2023-04-07T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T12:00:00.000Z", + "end": "2023-04-09T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-04-10 00:00:00", + "start": "2023-04-09T12:00:00.000Z", + "end": "2023-04-10T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2023-04-25 00:00:00", + "start": "2023-04-24T12:00:00.000Z", + "end": "2023-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2023-06-05 00:00:00", + "start": "2023-06-04T12:00:00.000Z", + "end": "2023-06-05T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, + { + "date": "2023-10-23 00:00:00", + "start": "2023-10-22T11:00:00.000Z", + "end": "2023-10-23T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T11:00:00.000Z", + "end": "2023-12-25T11: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-25T11:00:00.000Z", + "end": "2023-12-26T11: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/NZ-MWT-2024.json b/test/fixtures/NZ-MWT-2024.json new file mode 100644 index 000000000..bc12e9a14 --- /dev/null +++ b/test/fixtures/NZ-MWT-2024.json @@ -0,0 +1,110 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T11:00:00.000Z", + "end": "2024-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2024-01-02 00:00:00", + "start": "2024-01-01T11:00:00.000Z", + "end": "2024-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2024-02-06 00:00:00", + "start": "2024-02-05T11:00:00.000Z", + "end": "2024-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T11:00:00.000Z", + "end": "2024-03-29T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T11:00:00.000Z", + "end": "2024-03-31T11:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-04-01 00:00:00", + "start": "2024-03-31T11:00:00.000Z", + "end": "2024-04-01T11:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2024-04-25 00:00:00", + "start": "2024-04-24T12:00:00.000Z", + "end": "2024-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2024-06-03 00:00:00", + "start": "2024-06-02T12:00:00.000Z", + "end": "2024-06-03T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, + { + "date": "2024-10-28 00:00:00", + "start": "2024-10-27T11:00:00.000Z", + "end": "2024-10-28T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T11:00:00.000Z", + "end": "2024-12-25T11: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-25T11:00:00.000Z", + "end": "2024-12-26T11: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/NZ-MWT-2025.json b/test/fixtures/NZ-MWT-2025.json new file mode 100644 index 000000000..692ba6a76 --- /dev/null +++ b/test/fixtures/NZ-MWT-2025.json @@ -0,0 +1,110 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T11:00:00.000Z", + "end": "2025-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2025-01-02 00:00:00", + "start": "2025-01-01T11:00:00.000Z", + "end": "2025-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2025-02-06 00:00:00", + "start": "2025-02-05T11:00:00.000Z", + "end": "2025-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T12:00:00.000Z", + "end": "2025-04-18T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T12:00:00.000Z", + "end": "2025-04-20T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-04-21 00:00:00", + "start": "2025-04-20T12:00:00.000Z", + "end": "2025-04-21T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2025-04-25 00:00:00", + "start": "2025-04-24T12:00:00.000Z", + "end": "2025-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2025-06-02 00:00:00", + "start": "2025-06-01T12:00:00.000Z", + "end": "2025-06-02T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, + { + "date": "2025-10-27 00:00:00", + "start": "2025-10-26T11:00:00.000Z", + "end": "2025-10-27T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T11:00:00.000Z", + "end": "2025-12-25T11: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-25T11:00:00.000Z", + "end": "2025-12-26T11: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 diff --git a/test/fixtures/NZ-NSN-2022.json b/test/fixtures/NZ-NSN-2022.json index 188f0b517..3447219ed 100644 --- a/test/fixtures/NZ-NSN-2022.json +++ b/test/fixtures/NZ-NSN-2022.json @@ -110,6 +110,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, { "date": "2022-10-24 00:00:00", "start": "2022-10-23T11:00:00.000Z", diff --git a/test/fixtures/NZ-NSN-2023.json b/test/fixtures/NZ-NSN-2023.json index ba84cd640..020ff28ab 100644 --- a/test/fixtures/NZ-NSN-2023.json +++ b/test/fixtures/NZ-NSN-2023.json @@ -90,6 +90,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, { "date": "2023-10-23 00:00:00", "start": "2023-10-22T11:00:00.000Z", diff --git a/test/fixtures/NZ-NSN-2024.json b/test/fixtures/NZ-NSN-2024.json index e0111b0e9..6429c45d1 100644 --- a/test/fixtures/NZ-NSN-2024.json +++ b/test/fixtures/NZ-NSN-2024.json @@ -80,6 +80,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, { "date": "2024-10-28 00:00:00", "start": "2024-10-27T11:00:00.000Z", diff --git a/test/fixtures/NZ-NSN-2025.json b/test/fixtures/NZ-NSN-2025.json index b3aa8f3c2..942b8191b 100644 --- a/test/fixtures/NZ-NSN-2025.json +++ b/test/fixtures/NZ-NSN-2025.json @@ -80,6 +80,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, { "date": "2025-10-27 00:00:00", "start": "2025-10-26T11:00:00.000Z", diff --git a/test/fixtures/NZ-NTL-2022.json b/test/fixtures/NZ-NTL-2022.json index a76b0e1ff..ab7ccc9b1 100644 --- a/test/fixtures/NZ-NTL-2022.json +++ b/test/fixtures/NZ-NTL-2022.json @@ -110,6 +110,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, { "date": "2022-10-24 00:00:00", "start": "2022-10-23T11:00:00.000Z", diff --git a/test/fixtures/NZ-NTL-2023.json b/test/fixtures/NZ-NTL-2023.json index f019f60e2..6bec3f021 100644 --- a/test/fixtures/NZ-NTL-2023.json +++ b/test/fixtures/NZ-NTL-2023.json @@ -90,6 +90,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, { "date": "2023-10-23 00:00:00", "start": "2023-10-22T11:00:00.000Z", diff --git a/test/fixtures/NZ-NTL-2024.json b/test/fixtures/NZ-NTL-2024.json index 7da9d102f..48fcfc6aa 100644 --- a/test/fixtures/NZ-NTL-2024.json +++ b/test/fixtures/NZ-NTL-2024.json @@ -80,6 +80,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, { "date": "2024-10-28 00:00:00", "start": "2024-10-27T11:00:00.000Z", diff --git a/test/fixtures/NZ-NTL-2025.json b/test/fixtures/NZ-NTL-2025.json index 5d13a3551..01601fb0a 100644 --- a/test/fixtures/NZ-NTL-2025.json +++ b/test/fixtures/NZ-NTL-2025.json @@ -80,6 +80,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, { "date": "2025-10-27 00:00:00", "start": "2025-10-26T11:00:00.000Z", diff --git a/test/fixtures/NZ-OTA-2022.json b/test/fixtures/NZ-OTA-2022.json index 11eb7ec96..67946fce9 100644 --- a/test/fixtures/NZ-OTA-2022.json +++ b/test/fixtures/NZ-OTA-2022.json @@ -111,6 +111,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, { "date": "2022-10-24 00:00:00", "start": "2022-10-23T11:00:00.000Z", diff --git a/test/fixtures/NZ-OTA-2023.json b/test/fixtures/NZ-OTA-2023.json index 29758539a..e53cf7473 100644 --- a/test/fixtures/NZ-OTA-2023.json +++ b/test/fixtures/NZ-OTA-2023.json @@ -91,6 +91,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, { "date": "2023-10-23 00:00:00", "start": "2023-10-22T11:00:00.000Z", diff --git a/test/fixtures/NZ-OTA-2024.json b/test/fixtures/NZ-OTA-2024.json index 7850919dc..7ab86a515 100644 --- a/test/fixtures/NZ-OTA-2024.json +++ b/test/fixtures/NZ-OTA-2024.json @@ -81,6 +81,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, { "date": "2024-10-28 00:00:00", "start": "2024-10-27T11:00:00.000Z", diff --git a/test/fixtures/NZ-OTA-2025.json b/test/fixtures/NZ-OTA-2025.json index 6581ea71e..fb9ea74e6 100644 --- a/test/fixtures/NZ-OTA-2025.json +++ b/test/fixtures/NZ-OTA-2025.json @@ -81,6 +81,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, { "date": "2025-10-27 00:00:00", "start": "2025-10-26T11:00:00.000Z", diff --git a/test/fixtures/NZ-STL-2022.json b/test/fixtures/NZ-STL-2022.json index 1edd58b84..067a23de3 100644 --- a/test/fixtures/NZ-STL-2022.json +++ b/test/fixtures/NZ-STL-2022.json @@ -110,6 +110,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, { "date": "2022-10-24 00:00:00", "start": "2022-10-23T11:00:00.000Z", diff --git a/test/fixtures/NZ-STL-2023.json b/test/fixtures/NZ-STL-2023.json index 246507b5d..d6429189c 100644 --- a/test/fixtures/NZ-STL-2023.json +++ b/test/fixtures/NZ-STL-2023.json @@ -90,6 +90,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, { "date": "2023-10-23 00:00:00", "start": "2023-10-22T11:00:00.000Z", diff --git a/test/fixtures/NZ-STL-2024.json b/test/fixtures/NZ-STL-2024.json index 7215e4231..c6f6c8fb7 100644 --- a/test/fixtures/NZ-STL-2024.json +++ b/test/fixtures/NZ-STL-2024.json @@ -80,6 +80,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, { "date": "2024-10-28 00:00:00", "start": "2024-10-27T11:00:00.000Z", diff --git a/test/fixtures/NZ-STL-2025.json b/test/fixtures/NZ-STL-2025.json index 727e0250e..c4f73ca1d 100644 --- a/test/fixtures/NZ-STL-2025.json +++ b/test/fixtures/NZ-STL-2025.json @@ -80,6 +80,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, { "date": "2025-10-27 00:00:00", "start": "2025-10-26T11:00:00.000Z", diff --git a/test/fixtures/NZ-TAS-2015.json b/test/fixtures/NZ-TAS-2015.json new file mode 100644 index 000000000..c0a06d0bd --- /dev/null +++ b/test/fixtures/NZ-TAS-2015.json @@ -0,0 +1,121 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T11:00:00.000Z", + "end": "2015-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2015-01-02 00:00:00", + "start": "2015-01-01T11:00:00.000Z", + "end": "2015-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2015-02-06 00:00:00", + "start": "2015-02-05T11:00:00.000Z", + "end": "2015-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T11:00:00.000Z", + "end": "2015-04-03T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T11:00:00.000Z", + "end": "2015-04-05T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-04-06 00:00:00", + "start": "2015-04-05T12:00:00.000Z", + "end": "2015-04-06T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2015-04-25 00:00:00", + "start": "2015-04-24T12:00:00.000Z", + "end": "2015-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2015-04-27 00:00:00", + "start": "2015-04-26T12:00:00.000Z", + "end": "2015-04-27T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-06-01 00:00:00", + "start": "2015-05-31T12:00:00.000Z", + "end": "2015-06-01T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2015-10-26 00:00:00", + "start": "2015-10-25T11:00:00.000Z", + "end": "2015-10-26T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T11:00:00.000Z", + "end": "2015-12-25T11: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": "2015-12-26 00:00:00", + "start": "2015-12-25T11:00:00.000Z", + "end": "2015-12-26T11: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": "2015-12-28 00:00:00", + "start": "2015-12-27T11:00:00.000Z", + "end": "2015-12-28T11: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/NZ-TAS-2016.json b/test/fixtures/NZ-TAS-2016.json new file mode 100644 index 000000000..b7b23d51f --- /dev/null +++ b/test/fixtures/NZ-TAS-2016.json @@ -0,0 +1,131 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T11:00:00.000Z", + "end": "2016-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2016-01-02 00:00:00", + "start": "2016-01-01T11:00:00.000Z", + "end": "2016-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2016-01-04 00:00:00", + "start": "2016-01-03T11:00:00.000Z", + "end": "2016-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2016-02-06 00:00:00", + "start": "2016-02-05T11:00:00.000Z", + "end": "2016-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2016-02-08 00:00:00", + "start": "2016-02-07T11:00:00.000Z", + "end": "2016-02-08T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T11:00:00.000Z", + "end": "2016-03-25T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T11:00:00.000Z", + "end": "2016-03-27T11:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-03-28 00:00:00", + "start": "2016-03-27T11:00:00.000Z", + "end": "2016-03-28T11:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2016-04-25 00:00:00", + "start": "2016-04-24T12:00:00.000Z", + "end": "2016-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2016-06-06 00:00:00", + "start": "2016-06-05T12:00:00.000Z", + "end": "2016-06-06T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2016-10-24 00:00:00", + "start": "2016-10-23T11:00:00.000Z", + "end": "2016-10-24T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T11:00:00.000Z", + "end": "2016-12-25T11: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": "2016-12-26 00:00:00", + "start": "2016-12-25T11:00:00.000Z", + "end": "2016-12-26T11: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": "2016-12-27 00:00:00", + "start": "2016-12-26T11:00:00.000Z", + "end": "2016-12-27T11: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/NZ-TAS-2017.json b/test/fixtures/NZ-TAS-2017.json new file mode 100644 index 000000000..4c815ea98 --- /dev/null +++ b/test/fixtures/NZ-TAS-2017.json @@ -0,0 +1,111 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T11:00:00.000Z", + "end": "2017-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T11:00:00.000Z", + "end": "2017-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2017-01-03 00:00:00", + "start": "2017-01-02T11:00:00.000Z", + "end": "2017-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2017-02-06 00:00:00", + "start": "2017-02-05T11:00:00.000Z", + "end": "2017-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T12:00:00.000Z", + "end": "2017-04-14T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T12:00:00.000Z", + "end": "2017-04-16T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-04-17 00:00:00", + "start": "2017-04-16T12:00:00.000Z", + "end": "2017-04-17T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2017-04-25 00:00:00", + "start": "2017-04-24T12:00:00.000Z", + "end": "2017-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2017-06-05 00:00:00", + "start": "2017-06-04T12:00:00.000Z", + "end": "2017-06-05T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2017-10-23 00:00:00", + "start": "2017-10-22T11:00:00.000Z", + "end": "2017-10-23T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T11:00:00.000Z", + "end": "2017-12-25T11: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": "2017-12-26 00:00:00", + "start": "2017-12-25T11:00:00.000Z", + "end": "2017-12-26T11: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/NZ-TAS-2018.json b/test/fixtures/NZ-TAS-2018.json new file mode 100644 index 000000000..c22e3531d --- /dev/null +++ b/test/fixtures/NZ-TAS-2018.json @@ -0,0 +1,101 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T11:00:00.000Z", + "end": "2018-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2018-01-02 00:00:00", + "start": "2018-01-01T11:00:00.000Z", + "end": "2018-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2018-02-06 00:00:00", + "start": "2018-02-05T11:00:00.000Z", + "end": "2018-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T11:00:00.000Z", + "end": "2018-03-30T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T11:00:00.000Z", + "end": "2018-04-01T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-04-02 00:00:00", + "start": "2018-04-01T12:00:00.000Z", + "end": "2018-04-02T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2018-04-25 00:00:00", + "start": "2018-04-24T12:00:00.000Z", + "end": "2018-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2018-06-04 00:00:00", + "start": "2018-06-03T12:00:00.000Z", + "end": "2018-06-04T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2018-10-22 00:00:00", + "start": "2018-10-21T11:00:00.000Z", + "end": "2018-10-22T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T11:00:00.000Z", + "end": "2018-12-25T11:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2018-12-26 00:00:00", + "start": "2018-12-25T11:00:00.000Z", + "end": "2018-12-26T11:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/NZ-TAS-2019.json b/test/fixtures/NZ-TAS-2019.json new file mode 100644 index 000000000..6657dcafa --- /dev/null +++ b/test/fixtures/NZ-TAS-2019.json @@ -0,0 +1,101 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T11:00:00.000Z", + "end": "2019-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2019-01-02 00:00:00", + "start": "2019-01-01T11:00:00.000Z", + "end": "2019-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2019-02-06 00:00:00", + "start": "2019-02-05T11:00:00.000Z", + "end": "2019-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T12:00:00.000Z", + "end": "2019-04-19T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T12:00:00.000Z", + "end": "2019-04-21T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-04-22 00:00:00", + "start": "2019-04-21T12:00:00.000Z", + "end": "2019-04-22T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2019-04-25 00:00:00", + "start": "2019-04-24T12:00:00.000Z", + "end": "2019-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2019-06-03 00:00:00", + "start": "2019-06-02T12:00:00.000Z", + "end": "2019-06-03T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2019-10-28 00:00:00", + "start": "2019-10-27T11:00:00.000Z", + "end": "2019-10-28T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T11:00:00.000Z", + "end": "2019-12-25T11: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-25T11:00:00.000Z", + "end": "2019-12-26T11: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/NZ-TAS-2020.json b/test/fixtures/NZ-TAS-2020.json new file mode 100644 index 000000000..86f9ef48a --- /dev/null +++ b/test/fixtures/NZ-TAS-2020.json @@ -0,0 +1,121 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T11:00:00.000Z", + "end": "2020-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2020-01-02 00:00:00", + "start": "2020-01-01T11:00:00.000Z", + "end": "2020-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2020-02-06 00:00:00", + "start": "2020-02-05T11:00:00.000Z", + "end": "2020-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T12:00:00.000Z", + "end": "2020-04-10T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T12:00:00.000Z", + "end": "2020-04-12T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-04-13 00:00:00", + "start": "2020-04-12T12:00:00.000Z", + "end": "2020-04-13T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2020-04-25 00:00:00", + "start": "2020-04-24T12:00:00.000Z", + "end": "2020-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2020-04-27 00:00:00", + "start": "2020-04-26T12:00:00.000Z", + "end": "2020-04-27T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-06-01 00:00:00", + "start": "2020-05-31T12:00:00.000Z", + "end": "2020-06-01T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2020-10-26 00:00:00", + "start": "2020-10-25T11:00:00.000Z", + "end": "2020-10-26T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T11:00:00.000Z", + "end": "2020-12-25T11: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-25T11:00:00.000Z", + "end": "2020-12-26T11: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-27T11:00:00.000Z", + "end": "2020-12-28T11: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/NZ-TAS-2021.json b/test/fixtures/NZ-TAS-2021.json new file mode 100644 index 000000000..b6622958c --- /dev/null +++ b/test/fixtures/NZ-TAS-2021.json @@ -0,0 +1,151 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T11:00:00.000Z", + "end": "2021-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2021-01-02 00:00:00", + "start": "2021-01-01T11:00:00.000Z", + "end": "2021-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2021-01-04 00:00:00", + "start": "2021-01-03T11:00:00.000Z", + "end": "2021-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2021-02-06 00:00:00", + "start": "2021-02-05T11:00:00.000Z", + "end": "2021-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2021-02-08 00:00:00", + "start": "2021-02-07T11:00:00.000Z", + "end": "2021-02-08T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T11:00:00.000Z", + "end": "2021-04-02T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T11:00:00.000Z", + "end": "2021-04-04T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-04-05 00:00:00", + "start": "2021-04-04T12:00:00.000Z", + "end": "2021-04-05T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2021-04-25 00:00:00", + "start": "2021-04-24T12:00:00.000Z", + "end": "2021-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sun" + }, + { + "date": "2021-04-26 00:00:00", + "start": "2021-04-25T12:00:00.000Z", + "end": "2021-04-26T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2021-06-07 00:00:00", + "start": "2021-06-06T12:00:00.000Z", + "end": "2021-06-07T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2021-10-25 00:00:00", + "start": "2021-10-24T11:00:00.000Z", + "end": "2021-10-25T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T11:00:00.000Z", + "end": "2021-12-25T11: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-25T11:00:00.000Z", + "end": "2021-12-26T11: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-26T11:00:00.000Z", + "end": "2021-12-27T11: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-27T11:00:00.000Z", + "end": "2021-12-28T11: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/NZ-TAS-2022.json b/test/fixtures/NZ-TAS-2022.json new file mode 100644 index 000000000..651cb1aa6 --- /dev/null +++ b/test/fixtures/NZ-TAS-2022.json @@ -0,0 +1,150 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T11:00:00.000Z", + "end": "2022-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2022-01-02 00:00:00", + "start": "2022-01-01T11:00:00.000Z", + "end": "2022-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2022-01-03 00:00:00", + "start": "2022-01-02T11:00:00.000Z", + "end": "2022-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2022-01-04 00:00:00", + "start": "2022-01-03T11:00:00.000Z", + "end": "2022-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2022-02-06 00:00:00", + "start": "2022-02-05T11:00:00.000Z", + "end": "2022-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sun" + }, + { + "date": "2022-02-07 00:00:00", + "start": "2022-02-06T11:00:00.000Z", + "end": "2022-02-07T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T12:00:00.000Z", + "end": "2022-04-15T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T12:00:00.000Z", + "end": "2022-04-17T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-04-18 00:00:00", + "start": "2022-04-17T12:00:00.000Z", + "end": "2022-04-18T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2022-04-25 00:00:00", + "start": "2022-04-24T12:00:00.000Z", + "end": "2022-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-06-06 00:00:00", + "start": "2022-06-05T12:00:00.000Z", + "end": "2022-06-06T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, + { + "date": "2022-10-24 00:00:00", + "start": "2022-10-23T11:00:00.000Z", + "end": "2022-10-24T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T11:00:00.000Z", + "end": "2022-12-25T11: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-25T11:00:00.000Z", + "end": "2022-12-26T11: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-26T11:00:00.000Z", + "end": "2022-12-27T11: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/NZ-TAS-2023.json b/test/fixtures/NZ-TAS-2023.json new file mode 100644 index 000000000..bb159b944 --- /dev/null +++ b/test/fixtures/NZ-TAS-2023.json @@ -0,0 +1,120 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T11:00:00.000Z", + "end": "2023-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T11:00:00.000Z", + "end": "2023-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2023-01-03 00:00:00", + "start": "2023-01-02T11:00:00.000Z", + "end": "2023-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2023-02-06 00:00:00", + "start": "2023-02-05T11:00:00.000Z", + "end": "2023-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T12:00:00.000Z", + "end": "2023-04-07T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T12:00:00.000Z", + "end": "2023-04-09T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-04-10 00:00:00", + "start": "2023-04-09T12:00:00.000Z", + "end": "2023-04-10T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2023-04-25 00:00:00", + "start": "2023-04-24T12:00:00.000Z", + "end": "2023-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2023-06-05 00:00:00", + "start": "2023-06-04T12:00:00.000Z", + "end": "2023-06-05T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, + { + "date": "2023-10-23 00:00:00", + "start": "2023-10-22T11:00:00.000Z", + "end": "2023-10-23T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T11:00:00.000Z", + "end": "2023-12-25T11: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-25T11:00:00.000Z", + "end": "2023-12-26T11: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/NZ-TAS-2024.json b/test/fixtures/NZ-TAS-2024.json new file mode 100644 index 000000000..bc12e9a14 --- /dev/null +++ b/test/fixtures/NZ-TAS-2024.json @@ -0,0 +1,110 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T11:00:00.000Z", + "end": "2024-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2024-01-02 00:00:00", + "start": "2024-01-01T11:00:00.000Z", + "end": "2024-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2024-02-06 00:00:00", + "start": "2024-02-05T11:00:00.000Z", + "end": "2024-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T11:00:00.000Z", + "end": "2024-03-29T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T11:00:00.000Z", + "end": "2024-03-31T11:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-04-01 00:00:00", + "start": "2024-03-31T11:00:00.000Z", + "end": "2024-04-01T11:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2024-04-25 00:00:00", + "start": "2024-04-24T12:00:00.000Z", + "end": "2024-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2024-06-03 00:00:00", + "start": "2024-06-02T12:00:00.000Z", + "end": "2024-06-03T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, + { + "date": "2024-10-28 00:00:00", + "start": "2024-10-27T11:00:00.000Z", + "end": "2024-10-28T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T11:00:00.000Z", + "end": "2024-12-25T11: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-25T11:00:00.000Z", + "end": "2024-12-26T11: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/NZ-TAS-2025.json b/test/fixtures/NZ-TAS-2025.json new file mode 100644 index 000000000..692ba6a76 --- /dev/null +++ b/test/fixtures/NZ-TAS-2025.json @@ -0,0 +1,110 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T11:00:00.000Z", + "end": "2025-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2025-01-02 00:00:00", + "start": "2025-01-01T11:00:00.000Z", + "end": "2025-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2025-02-06 00:00:00", + "start": "2025-02-05T11:00:00.000Z", + "end": "2025-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T12:00:00.000Z", + "end": "2025-04-18T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T12:00:00.000Z", + "end": "2025-04-20T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-04-21 00:00:00", + "start": "2025-04-20T12:00:00.000Z", + "end": "2025-04-21T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2025-04-25 00:00:00", + "start": "2025-04-24T12:00:00.000Z", + "end": "2025-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2025-06-02 00:00:00", + "start": "2025-06-01T12:00:00.000Z", + "end": "2025-06-02T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, + { + "date": "2025-10-27 00:00:00", + "start": "2025-10-26T11:00:00.000Z", + "end": "2025-10-27T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T11:00:00.000Z", + "end": "2025-12-25T11: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-25T11:00:00.000Z", + "end": "2025-12-26T11: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 diff --git a/test/fixtures/NZ-TKI-2022.json b/test/fixtures/NZ-TKI-2022.json index 9be389c1d..20b075340 100644 --- a/test/fixtures/NZ-TKI-2022.json +++ b/test/fixtures/NZ-TKI-2022.json @@ -110,6 +110,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, { "date": "2022-10-24 00:00:00", "start": "2022-10-23T11:00:00.000Z", diff --git a/test/fixtures/NZ-TKI-2023.json b/test/fixtures/NZ-TKI-2023.json index 00960dea0..ff57e75d9 100644 --- a/test/fixtures/NZ-TKI-2023.json +++ b/test/fixtures/NZ-TKI-2023.json @@ -90,6 +90,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, { "date": "2023-10-23 00:00:00", "start": "2023-10-22T11:00:00.000Z", diff --git a/test/fixtures/NZ-TKI-2024.json b/test/fixtures/NZ-TKI-2024.json index 50e267242..13a62020f 100644 --- a/test/fixtures/NZ-TKI-2024.json +++ b/test/fixtures/NZ-TKI-2024.json @@ -80,6 +80,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, { "date": "2024-10-28 00:00:00", "start": "2024-10-27T11:00:00.000Z", diff --git a/test/fixtures/NZ-TKI-2025.json b/test/fixtures/NZ-TKI-2025.json index ce4b1656e..996e10f80 100644 --- a/test/fixtures/NZ-TKI-2025.json +++ b/test/fixtures/NZ-TKI-2025.json @@ -80,6 +80,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, { "date": "2025-10-27 00:00:00", "start": "2025-10-26T11:00:00.000Z", diff --git a/test/fixtures/NZ-WGN-2022.json b/test/fixtures/NZ-WGN-2022.json index 383ed2b80..efc94dda4 100644 --- a/test/fixtures/NZ-WGN-2022.json +++ b/test/fixtures/NZ-WGN-2022.json @@ -110,6 +110,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, { "date": "2022-10-24 00:00:00", "start": "2022-10-23T11:00:00.000Z", diff --git a/test/fixtures/NZ-WGN-2023.json b/test/fixtures/NZ-WGN-2023.json index f036fe6df..a64d57c2b 100644 --- a/test/fixtures/NZ-WGN-2023.json +++ b/test/fixtures/NZ-WGN-2023.json @@ -90,6 +90,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, { "date": "2023-10-23 00:00:00", "start": "2023-10-22T11:00:00.000Z", diff --git a/test/fixtures/NZ-WGN-2024.json b/test/fixtures/NZ-WGN-2024.json index 4704e2ead..0553cfc95 100644 --- a/test/fixtures/NZ-WGN-2024.json +++ b/test/fixtures/NZ-WGN-2024.json @@ -80,6 +80,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, { "date": "2024-10-28 00:00:00", "start": "2024-10-27T11:00:00.000Z", diff --git a/test/fixtures/NZ-WGN-2025.json b/test/fixtures/NZ-WGN-2025.json index dc752aaf9..200dc9e16 100644 --- a/test/fixtures/NZ-WGN-2025.json +++ b/test/fixtures/NZ-WGN-2025.json @@ -80,6 +80,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, { "date": "2025-10-27 00:00:00", "start": "2025-10-26T11:00:00.000Z", diff --git a/test/fixtures/NZ-WKO-2015.json b/test/fixtures/NZ-WKO-2015.json new file mode 100644 index 000000000..c0a06d0bd --- /dev/null +++ b/test/fixtures/NZ-WKO-2015.json @@ -0,0 +1,121 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T11:00:00.000Z", + "end": "2015-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2015-01-02 00:00:00", + "start": "2015-01-01T11:00:00.000Z", + "end": "2015-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2015-02-06 00:00:00", + "start": "2015-02-05T11:00:00.000Z", + "end": "2015-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T11:00:00.000Z", + "end": "2015-04-03T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T11:00:00.000Z", + "end": "2015-04-05T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-04-06 00:00:00", + "start": "2015-04-05T12:00:00.000Z", + "end": "2015-04-06T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2015-04-25 00:00:00", + "start": "2015-04-24T12:00:00.000Z", + "end": "2015-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2015-04-27 00:00:00", + "start": "2015-04-26T12:00:00.000Z", + "end": "2015-04-27T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-06-01 00:00:00", + "start": "2015-05-31T12:00:00.000Z", + "end": "2015-06-01T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2015-10-26 00:00:00", + "start": "2015-10-25T11:00:00.000Z", + "end": "2015-10-26T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T11:00:00.000Z", + "end": "2015-12-25T11: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": "2015-12-26 00:00:00", + "start": "2015-12-25T11:00:00.000Z", + "end": "2015-12-26T11: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": "2015-12-28 00:00:00", + "start": "2015-12-27T11:00:00.000Z", + "end": "2015-12-28T11: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/NZ-WKO-2016.json b/test/fixtures/NZ-WKO-2016.json new file mode 100644 index 000000000..b7b23d51f --- /dev/null +++ b/test/fixtures/NZ-WKO-2016.json @@ -0,0 +1,131 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T11:00:00.000Z", + "end": "2016-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2016-01-02 00:00:00", + "start": "2016-01-01T11:00:00.000Z", + "end": "2016-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2016-01-04 00:00:00", + "start": "2016-01-03T11:00:00.000Z", + "end": "2016-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2016-02-06 00:00:00", + "start": "2016-02-05T11:00:00.000Z", + "end": "2016-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2016-02-08 00:00:00", + "start": "2016-02-07T11:00:00.000Z", + "end": "2016-02-08T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T11:00:00.000Z", + "end": "2016-03-25T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T11:00:00.000Z", + "end": "2016-03-27T11:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-03-28 00:00:00", + "start": "2016-03-27T11:00:00.000Z", + "end": "2016-03-28T11:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2016-04-25 00:00:00", + "start": "2016-04-24T12:00:00.000Z", + "end": "2016-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2016-06-06 00:00:00", + "start": "2016-06-05T12:00:00.000Z", + "end": "2016-06-06T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2016-10-24 00:00:00", + "start": "2016-10-23T11:00:00.000Z", + "end": "2016-10-24T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T11:00:00.000Z", + "end": "2016-12-25T11: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": "2016-12-26 00:00:00", + "start": "2016-12-25T11:00:00.000Z", + "end": "2016-12-26T11: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": "2016-12-27 00:00:00", + "start": "2016-12-26T11:00:00.000Z", + "end": "2016-12-27T11: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/NZ-WKO-2017.json b/test/fixtures/NZ-WKO-2017.json new file mode 100644 index 000000000..4c815ea98 --- /dev/null +++ b/test/fixtures/NZ-WKO-2017.json @@ -0,0 +1,111 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T11:00:00.000Z", + "end": "2017-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T11:00:00.000Z", + "end": "2017-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2017-01-03 00:00:00", + "start": "2017-01-02T11:00:00.000Z", + "end": "2017-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2017-02-06 00:00:00", + "start": "2017-02-05T11:00:00.000Z", + "end": "2017-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T12:00:00.000Z", + "end": "2017-04-14T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T12:00:00.000Z", + "end": "2017-04-16T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-04-17 00:00:00", + "start": "2017-04-16T12:00:00.000Z", + "end": "2017-04-17T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2017-04-25 00:00:00", + "start": "2017-04-24T12:00:00.000Z", + "end": "2017-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2017-06-05 00:00:00", + "start": "2017-06-04T12:00:00.000Z", + "end": "2017-06-05T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2017-10-23 00:00:00", + "start": "2017-10-22T11:00:00.000Z", + "end": "2017-10-23T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T11:00:00.000Z", + "end": "2017-12-25T11: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": "2017-12-26 00:00:00", + "start": "2017-12-25T11:00:00.000Z", + "end": "2017-12-26T11: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/NZ-WKO-2018.json b/test/fixtures/NZ-WKO-2018.json new file mode 100644 index 000000000..c22e3531d --- /dev/null +++ b/test/fixtures/NZ-WKO-2018.json @@ -0,0 +1,101 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T11:00:00.000Z", + "end": "2018-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2018-01-02 00:00:00", + "start": "2018-01-01T11:00:00.000Z", + "end": "2018-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2018-02-06 00:00:00", + "start": "2018-02-05T11:00:00.000Z", + "end": "2018-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T11:00:00.000Z", + "end": "2018-03-30T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T11:00:00.000Z", + "end": "2018-04-01T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-04-02 00:00:00", + "start": "2018-04-01T12:00:00.000Z", + "end": "2018-04-02T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2018-04-25 00:00:00", + "start": "2018-04-24T12:00:00.000Z", + "end": "2018-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2018-06-04 00:00:00", + "start": "2018-06-03T12:00:00.000Z", + "end": "2018-06-04T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2018-10-22 00:00:00", + "start": "2018-10-21T11:00:00.000Z", + "end": "2018-10-22T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T11:00:00.000Z", + "end": "2018-12-25T11:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2018-12-26 00:00:00", + "start": "2018-12-25T11:00:00.000Z", + "end": "2018-12-26T11:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/NZ-WKO-2019.json b/test/fixtures/NZ-WKO-2019.json new file mode 100644 index 000000000..6657dcafa --- /dev/null +++ b/test/fixtures/NZ-WKO-2019.json @@ -0,0 +1,101 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T11:00:00.000Z", + "end": "2019-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2019-01-02 00:00:00", + "start": "2019-01-01T11:00:00.000Z", + "end": "2019-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2019-02-06 00:00:00", + "start": "2019-02-05T11:00:00.000Z", + "end": "2019-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T12:00:00.000Z", + "end": "2019-04-19T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T12:00:00.000Z", + "end": "2019-04-21T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-04-22 00:00:00", + "start": "2019-04-21T12:00:00.000Z", + "end": "2019-04-22T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2019-04-25 00:00:00", + "start": "2019-04-24T12:00:00.000Z", + "end": "2019-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2019-06-03 00:00:00", + "start": "2019-06-02T12:00:00.000Z", + "end": "2019-06-03T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2019-10-28 00:00:00", + "start": "2019-10-27T11:00:00.000Z", + "end": "2019-10-28T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T11:00:00.000Z", + "end": "2019-12-25T11: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-25T11:00:00.000Z", + "end": "2019-12-26T11: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/NZ-WKO-2020.json b/test/fixtures/NZ-WKO-2020.json new file mode 100644 index 000000000..86f9ef48a --- /dev/null +++ b/test/fixtures/NZ-WKO-2020.json @@ -0,0 +1,121 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T11:00:00.000Z", + "end": "2020-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2020-01-02 00:00:00", + "start": "2020-01-01T11:00:00.000Z", + "end": "2020-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2020-02-06 00:00:00", + "start": "2020-02-05T11:00:00.000Z", + "end": "2020-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T12:00:00.000Z", + "end": "2020-04-10T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T12:00:00.000Z", + "end": "2020-04-12T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-04-13 00:00:00", + "start": "2020-04-12T12:00:00.000Z", + "end": "2020-04-13T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2020-04-25 00:00:00", + "start": "2020-04-24T12:00:00.000Z", + "end": "2020-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2020-04-27 00:00:00", + "start": "2020-04-26T12:00:00.000Z", + "end": "2020-04-27T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-06-01 00:00:00", + "start": "2020-05-31T12:00:00.000Z", + "end": "2020-06-01T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2020-10-26 00:00:00", + "start": "2020-10-25T11:00:00.000Z", + "end": "2020-10-26T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T11:00:00.000Z", + "end": "2020-12-25T11: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-25T11:00:00.000Z", + "end": "2020-12-26T11: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-27T11:00:00.000Z", + "end": "2020-12-28T11: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/NZ-WKO-2021.json b/test/fixtures/NZ-WKO-2021.json new file mode 100644 index 000000000..b6622958c --- /dev/null +++ b/test/fixtures/NZ-WKO-2021.json @@ -0,0 +1,151 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T11:00:00.000Z", + "end": "2021-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2021-01-02 00:00:00", + "start": "2021-01-01T11:00:00.000Z", + "end": "2021-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2021-01-04 00:00:00", + "start": "2021-01-03T11:00:00.000Z", + "end": "2021-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2021-02-06 00:00:00", + "start": "2021-02-05T11:00:00.000Z", + "end": "2021-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2021-02-08 00:00:00", + "start": "2021-02-07T11:00:00.000Z", + "end": "2021-02-08T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T11:00:00.000Z", + "end": "2021-04-02T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T11:00:00.000Z", + "end": "2021-04-04T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-04-05 00:00:00", + "start": "2021-04-04T12:00:00.000Z", + "end": "2021-04-05T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2021-04-25 00:00:00", + "start": "2021-04-24T12:00:00.000Z", + "end": "2021-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sun" + }, + { + "date": "2021-04-26 00:00:00", + "start": "2021-04-25T12:00:00.000Z", + "end": "2021-04-26T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2021-06-07 00:00:00", + "start": "2021-06-06T12:00:00.000Z", + "end": "2021-06-07T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2021-10-25 00:00:00", + "start": "2021-10-24T11:00:00.000Z", + "end": "2021-10-25T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T11:00:00.000Z", + "end": "2021-12-25T11: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-25T11:00:00.000Z", + "end": "2021-12-26T11: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-26T11:00:00.000Z", + "end": "2021-12-27T11: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-27T11:00:00.000Z", + "end": "2021-12-28T11: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/NZ-WKO-2022.json b/test/fixtures/NZ-WKO-2022.json new file mode 100644 index 000000000..651cb1aa6 --- /dev/null +++ b/test/fixtures/NZ-WKO-2022.json @@ -0,0 +1,150 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T11:00:00.000Z", + "end": "2022-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2022-01-02 00:00:00", + "start": "2022-01-01T11:00:00.000Z", + "end": "2022-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2022-01-03 00:00:00", + "start": "2022-01-02T11:00:00.000Z", + "end": "2022-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2022-01-04 00:00:00", + "start": "2022-01-03T11:00:00.000Z", + "end": "2022-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2022-02-06 00:00:00", + "start": "2022-02-05T11:00:00.000Z", + "end": "2022-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sun" + }, + { + "date": "2022-02-07 00:00:00", + "start": "2022-02-06T11:00:00.000Z", + "end": "2022-02-07T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T12:00:00.000Z", + "end": "2022-04-15T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T12:00:00.000Z", + "end": "2022-04-17T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-04-18 00:00:00", + "start": "2022-04-17T12:00:00.000Z", + "end": "2022-04-18T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2022-04-25 00:00:00", + "start": "2022-04-24T12:00:00.000Z", + "end": "2022-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-06-06 00:00:00", + "start": "2022-06-05T12:00:00.000Z", + "end": "2022-06-06T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, + { + "date": "2022-10-24 00:00:00", + "start": "2022-10-23T11:00:00.000Z", + "end": "2022-10-24T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T11:00:00.000Z", + "end": "2022-12-25T11: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-25T11:00:00.000Z", + "end": "2022-12-26T11: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-26T11:00:00.000Z", + "end": "2022-12-27T11: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/NZ-WKO-2023.json b/test/fixtures/NZ-WKO-2023.json new file mode 100644 index 000000000..bb159b944 --- /dev/null +++ b/test/fixtures/NZ-WKO-2023.json @@ -0,0 +1,120 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T11:00:00.000Z", + "end": "2023-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T11:00:00.000Z", + "end": "2023-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2023-01-03 00:00:00", + "start": "2023-01-02T11:00:00.000Z", + "end": "2023-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2023-02-06 00:00:00", + "start": "2023-02-05T11:00:00.000Z", + "end": "2023-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T12:00:00.000Z", + "end": "2023-04-07T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T12:00:00.000Z", + "end": "2023-04-09T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-04-10 00:00:00", + "start": "2023-04-09T12:00:00.000Z", + "end": "2023-04-10T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2023-04-25 00:00:00", + "start": "2023-04-24T12:00:00.000Z", + "end": "2023-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2023-06-05 00:00:00", + "start": "2023-06-04T12:00:00.000Z", + "end": "2023-06-05T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, + { + "date": "2023-10-23 00:00:00", + "start": "2023-10-22T11:00:00.000Z", + "end": "2023-10-23T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T11:00:00.000Z", + "end": "2023-12-25T11: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-25T11:00:00.000Z", + "end": "2023-12-26T11: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/NZ-WKO-2024.json b/test/fixtures/NZ-WKO-2024.json new file mode 100644 index 000000000..bc12e9a14 --- /dev/null +++ b/test/fixtures/NZ-WKO-2024.json @@ -0,0 +1,110 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T11:00:00.000Z", + "end": "2024-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2024-01-02 00:00:00", + "start": "2024-01-01T11:00:00.000Z", + "end": "2024-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2024-02-06 00:00:00", + "start": "2024-02-05T11:00:00.000Z", + "end": "2024-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T11:00:00.000Z", + "end": "2024-03-29T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T11:00:00.000Z", + "end": "2024-03-31T11:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-04-01 00:00:00", + "start": "2024-03-31T11:00:00.000Z", + "end": "2024-04-01T11:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2024-04-25 00:00:00", + "start": "2024-04-24T12:00:00.000Z", + "end": "2024-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2024-06-03 00:00:00", + "start": "2024-06-02T12:00:00.000Z", + "end": "2024-06-03T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, + { + "date": "2024-10-28 00:00:00", + "start": "2024-10-27T11:00:00.000Z", + "end": "2024-10-28T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T11:00:00.000Z", + "end": "2024-12-25T11: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-25T11:00:00.000Z", + "end": "2024-12-26T11: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/NZ-WKO-2025.json b/test/fixtures/NZ-WKO-2025.json new file mode 100644 index 000000000..692ba6a76 --- /dev/null +++ b/test/fixtures/NZ-WKO-2025.json @@ -0,0 +1,110 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T11:00:00.000Z", + "end": "2025-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2025-01-02 00:00:00", + "start": "2025-01-01T11:00:00.000Z", + "end": "2025-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2025-02-06 00:00:00", + "start": "2025-02-05T11:00:00.000Z", + "end": "2025-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T12:00:00.000Z", + "end": "2025-04-18T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T12:00:00.000Z", + "end": "2025-04-20T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-04-21 00:00:00", + "start": "2025-04-20T12:00:00.000Z", + "end": "2025-04-21T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2025-04-25 00:00:00", + "start": "2025-04-24T12:00:00.000Z", + "end": "2025-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2025-06-02 00:00:00", + "start": "2025-06-01T12:00:00.000Z", + "end": "2025-06-02T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, + { + "date": "2025-10-27 00:00:00", + "start": "2025-10-26T11:00:00.000Z", + "end": "2025-10-27T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T11:00:00.000Z", + "end": "2025-12-25T11: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-25T11:00:00.000Z", + "end": "2025-12-26T11: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 diff --git a/test/fixtures/NZ-WTC-2022.json b/test/fixtures/NZ-WTC-2022.json index e127a2a41..ce22685ac 100644 --- a/test/fixtures/NZ-WTC-2022.json +++ b/test/fixtures/NZ-WTC-2022.json @@ -101,6 +101,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, { "date": "2022-10-24 00:00:00", "start": "2022-10-23T11:00:00.000Z", diff --git a/test/fixtures/NZ-WTC-2023.json b/test/fixtures/NZ-WTC-2023.json index fbeab9dfd..706fcd3ec 100644 --- a/test/fixtures/NZ-WTC-2023.json +++ b/test/fixtures/NZ-WTC-2023.json @@ -81,6 +81,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, { "date": "2023-10-23 00:00:00", "start": "2023-10-22T11:00:00.000Z", diff --git a/test/fixtures/NZ-WTC-2024.json b/test/fixtures/NZ-WTC-2024.json index b53889714..8078ea54a 100644 --- a/test/fixtures/NZ-WTC-2024.json +++ b/test/fixtures/NZ-WTC-2024.json @@ -71,6 +71,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, { "date": "2024-10-28 00:00:00", "start": "2024-10-27T11:00:00.000Z", diff --git a/test/fixtures/NZ-WTC-2025.json b/test/fixtures/NZ-WTC-2025.json index 44ce10572..6a296357f 100644 --- a/test/fixtures/NZ-WTC-2025.json +++ b/test/fixtures/NZ-WTC-2025.json @@ -71,6 +71,15 @@ "rule": "1st monday in June", "_weekday": "Mon" }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, { "date": "2025-10-27 00:00:00", "start": "2025-10-26T11:00:00.000Z", From 7a2eaaf160c4d30d6ac610cdff4e47f7148dd530 Mon Sep 17 00:00:00 2001 From: commenthol Date: Sat, 27 Nov 2021 17:38:29 +1200 Subject: [PATCH 2/2] fix(NZ,#288): Provincial anniversary days --- README.md | 3 +- data/countries/NZ.yaml | 42 ++++- test/fixtures/NZ-BOP-2015.json | 9 + test/fixtures/NZ-BOP-2016.json | 9 + test/fixtures/NZ-BOP-2017.json | 9 + test/fixtures/NZ-BOP-2018.json | 9 + test/fixtures/NZ-BOP-2019.json | 9 + test/fixtures/NZ-BOP-2020.json | 9 + test/fixtures/NZ-BOP-2021.json | 9 + test/fixtures/NZ-BOP-2022.json | 9 + test/fixtures/NZ-BOP-2023.json | 9 + test/fixtures/NZ-BOP-2024.json | 9 + test/fixtures/NZ-BOP-2025.json | 9 + test/fixtures/NZ-CAN-2015.json | 1 + test/fixtures/NZ-CAN-2016.json | 1 + test/fixtures/NZ-CAN-2017.json | 1 + test/fixtures/NZ-CAN-2018.json | 1 + test/fixtures/NZ-CAN-2019.json | 1 + test/fixtures/NZ-CAN-2020.json | 1 + test/fixtures/NZ-CAN-2021.json | 1 + test/fixtures/NZ-CAN-2022.json | 1 + test/fixtures/NZ-CAN-2023.json | 1 + test/fixtures/NZ-CAN-2024.json | 1 + test/fixtures/NZ-CAN-2025.json | 1 + test/fixtures/NZ-CAN-Timaru-2015.json | 131 ++++++++++++++ test/fixtures/NZ-CAN-Timaru-2016.json | 141 +++++++++++++++ test/fixtures/NZ-CAN-Timaru-2017.json | 121 +++++++++++++ test/fixtures/NZ-CAN-Timaru-2018.json | 111 ++++++++++++ test/fixtures/NZ-CAN-Timaru-2019.json | 111 ++++++++++++ test/fixtures/NZ-CAN-Timaru-2020.json | 131 ++++++++++++++ test/fixtures/NZ-CAN-Timaru-2021.json | 161 ++++++++++++++++++ test/fixtures/NZ-CAN-Timaru-2022.json | 160 +++++++++++++++++ test/fixtures/NZ-CAN-Timaru-2023.json | 130 ++++++++++++++ test/fixtures/NZ-CAN-Timaru-2024.json | 120 +++++++++++++ test/fixtures/NZ-CAN-Timaru-2025.json | 120 +++++++++++++ test/fixtures/NZ-GIS-2015.json | 9 + test/fixtures/NZ-GIS-2016.json | 9 + test/fixtures/NZ-GIS-2017.json | 9 + test/fixtures/NZ-GIS-2018.json | 9 + test/fixtures/NZ-GIS-2019.json | 9 + test/fixtures/NZ-GIS-2020.json | 9 + test/fixtures/NZ-GIS-2021.json | 9 + test/fixtures/NZ-GIS-2022.json | 9 + test/fixtures/NZ-GIS-2023.json | 9 + test/fixtures/NZ-GIS-2024.json | 9 + test/fixtures/NZ-GIS-2025.json | 9 + test/fixtures/NZ-MWT-2015.json | 9 + test/fixtures/NZ-MWT-2016.json | 9 + test/fixtures/NZ-MWT-2017.json | 9 + test/fixtures/NZ-MWT-2018.json | 9 + test/fixtures/NZ-MWT-2019.json | 9 + test/fixtures/NZ-MWT-2020.json | 9 + test/fixtures/NZ-MWT-2021.json | 9 + test/fixtures/NZ-MWT-2022.json | 9 + test/fixtures/NZ-MWT-2023.json | 9 + test/fixtures/NZ-MWT-2024.json | 9 + test/fixtures/NZ-MWT-2025.json | 9 + test/fixtures/NZ-TAS-2015.json | 9 + test/fixtures/NZ-TAS-2016.json | 9 + test/fixtures/NZ-TAS-2017.json | 9 + test/fixtures/NZ-TAS-2018.json | 9 + test/fixtures/NZ-TAS-2019.json | 9 + test/fixtures/NZ-TAS-2020.json | 9 + test/fixtures/NZ-TAS-2021.json | 9 + test/fixtures/NZ-TAS-2022.json | 9 + test/fixtures/NZ-TAS-2023.json | 9 + test/fixtures/NZ-TAS-2024.json | 9 + test/fixtures/NZ-TAS-2025.json | 9 + test/fixtures/NZ-WKO-2015.json | 9 + test/fixtures/NZ-WKO-2016.json | 9 + test/fixtures/NZ-WKO-2017.json | 9 + test/fixtures/NZ-WKO-2018.json | 9 + test/fixtures/NZ-WKO-2019.json | 9 + test/fixtures/NZ-WKO-2020.json | 9 + test/fixtures/NZ-WKO-2021.json | 9 + test/fixtures/NZ-WKO-2022.json | 9 + test/fixtures/NZ-WKO-2023.json | 9 + test/fixtures/NZ-WKO-2024.json | 9 + test/fixtures/NZ-WKO-2025.json | 9 + ...AN-S-2015.json => NZ-WTC-Buller-2015.json} | 18 +- ...AN-S-2016.json => NZ-WTC-Buller-2016.json} | 18 +- ...AN-S-2017.json => NZ-WTC-Buller-2017.json} | 18 +- ...AN-S-2018.json => NZ-WTC-Buller-2018.json} | 18 +- ...AN-S-2019.json => NZ-WTC-Buller-2019.json} | 18 +- ...AN-S-2020.json => NZ-WTC-Buller-2020.json} | 18 +- ...AN-S-2021.json => NZ-WTC-Buller-2021.json} | 18 +- ...AN-S-2022.json => NZ-WTC-Buller-2022.json} | 18 +- ...AN-S-2023.json => NZ-WTC-Buller-2023.json} | 18 +- ...AN-S-2024.json => NZ-WTC-Buller-2024.json} | 18 +- ...AN-S-2025.json => NZ-WTC-Buller-2025.json} | 18 +- 90 files changed, 2084 insertions(+), 102 deletions(-) create mode 100644 test/fixtures/NZ-CAN-Timaru-2015.json create mode 100644 test/fixtures/NZ-CAN-Timaru-2016.json create mode 100644 test/fixtures/NZ-CAN-Timaru-2017.json create mode 100644 test/fixtures/NZ-CAN-Timaru-2018.json create mode 100644 test/fixtures/NZ-CAN-Timaru-2019.json create mode 100644 test/fixtures/NZ-CAN-Timaru-2020.json create mode 100644 test/fixtures/NZ-CAN-Timaru-2021.json create mode 100644 test/fixtures/NZ-CAN-Timaru-2022.json create mode 100644 test/fixtures/NZ-CAN-Timaru-2023.json create mode 100644 test/fixtures/NZ-CAN-Timaru-2024.json create mode 100644 test/fixtures/NZ-CAN-Timaru-2025.json rename test/fixtures/{NZ-CAN-S-2015.json => NZ-WTC-Buller-2015.json} (92%) rename test/fixtures/{NZ-CAN-S-2016.json => NZ-WTC-Buller-2016.json} (93%) rename test/fixtures/{NZ-CAN-S-2017.json => NZ-WTC-Buller-2017.json} (92%) rename test/fixtures/{NZ-CAN-S-2018.json => NZ-WTC-Buller-2018.json} (91%) rename test/fixtures/{NZ-CAN-S-2019.json => NZ-WTC-Buller-2019.json} (91%) rename test/fixtures/{NZ-CAN-S-2020.json => NZ-WTC-Buller-2020.json} (92%) rename test/fixtures/{NZ-CAN-S-2021.json => NZ-WTC-Buller-2021.json} (94%) rename test/fixtures/{NZ-CAN-S-2022.json => NZ-WTC-Buller-2022.json} (94%) rename test/fixtures/{NZ-CAN-S-2023.json => NZ-WTC-Buller-2023.json} (92%) rename test/fixtures/{NZ-CAN-S-2024.json => NZ-WTC-Buller-2024.json} (91%) rename test/fixtures/{NZ-CAN-S-2025.json => NZ-WTC-Buller-2025.json} (91%) diff --git a/README.md b/README.md index 024218148..7c860461a 100644 --- a/README.md +++ b/README.md @@ -391,7 +391,7 @@ Countries: 194 │ ├── AUK: Auckland Province │ ├── BOP: Bay of Plenty │ ├── CAN: Canterbury -│ │ └── S: South Canterbury +│ │ └── Timaru: Timaru District │ ├── CIT: Chatham Islands │ ├── GIS: Gisborne │ ├── HKB: Hawke's Bay @@ -406,6 +406,7 @@ Countries: 194 │ ├── WKO: Waikato │ ├── WGN: Wellington Province │ └── WTC: Westland +│ └── Buller: Buller district ├── PA: Panamá ├── PE: Perú │ └── CUS: Cuzco diff --git a/data/countries/NZ.yaml b/data/countries/NZ.yaml index c7f4dc17b..6b1ed458c 100644 --- a/data/countries/NZ.yaml +++ b/data/countries/NZ.yaml @@ -153,6 +153,11 @@ holidays: names: en: Bay of Plenty mi: Te Moana-a-Toi + days: + # Same as in NZ-AUK + 01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday: + name: + en: Provincial anniversary day CAN: names: en: Canterbury @@ -161,9 +166,10 @@ holidays: friday after 2nd tuesday in November: name: en: Christchurch Show Day + note: May differ in parts of North Canterbury regions: - S: - name: South Canterbury + Timaru: # South Canterbury + name: Timaru District days: friday after 2nd tuesday in November: false 4th monday in September: @@ -181,11 +187,17 @@ holidays: names: en: Gisborne mi: Te Tai Rāwhiti + days: + # Same as NZ-AUK + 01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday: + name: + en: Provincial anniversary day HKB: names: en: Hawke's Bay mi: Te Matau-a-Māui days: + # Friday before Labour Day friday before 4th monday in October: name: en: Provincial anniversary day @@ -194,11 +206,17 @@ holidays: en: Marlborough mi: Te Tauihu-o-te-waka days: + # Monday after Labour Day 5th monday in October: name: en: Provincial anniversary day MWT: name: Manawatu-Wanganui + days: + # Same as in NZ-WGN + 01-22 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday: + name: + en: Provincial anniversary day NSN: names: en: Nelson @@ -220,6 +238,7 @@ holidays: en: Otago Province mi: Ōtākou days: + # TODO: needs new rule "03-23 if ... then next monday if easter 1 then next Monday" 03-23 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday: name: en: Provincial anniversary day @@ -236,6 +255,11 @@ holidays: names: en: Tasman mi: Te Tai-o-Aorere + days: + # Same as NZ-NSN + 02-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday: + name: + en: Provincial anniversary day TKI: name: Taranaki days: @@ -244,6 +268,11 @@ holidays: en: Provincial anniversary day WKO: name: Waikato + days: + # Same as NZ-AUK + 01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday: + name: + en: Provincial anniversary day WGN: names: en: Wellington Province @@ -260,3 +289,12 @@ holidays: 12-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday: name: en: Provincial anniversary day + regions: + Buller: + name: Buller district + days: + 12-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday: false + # Same as NZ-NSN + 02-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday: + name: + en: Provincial anniversary day diff --git a/test/fixtures/NZ-BOP-2015.json b/test/fixtures/NZ-BOP-2015.json index c0a06d0bd..1b59e5949 100644 --- a/test/fixtures/NZ-BOP-2015.json +++ b/test/fixtures/NZ-BOP-2015.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Fri" }, + { + "date": "2015-01-26 00:00:00", + "start": "2015-01-25T11:00:00.000Z", + "end": "2015-01-26T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2015-02-06 00:00:00", "start": "2015-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-BOP-2016.json b/test/fixtures/NZ-BOP-2016.json index b7b23d51f..e770c1188 100644 --- a/test/fixtures/NZ-BOP-2016.json +++ b/test/fixtures/NZ-BOP-2016.json @@ -27,6 +27,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Mon" }, + { + "date": "2016-02-01 00:00:00", + "start": "2016-01-31T11:00:00.000Z", + "end": "2016-02-01T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2016-02-06 00:00:00", "start": "2016-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-BOP-2017.json b/test/fixtures/NZ-BOP-2017.json index 4c815ea98..68a433526 100644 --- a/test/fixtures/NZ-BOP-2017.json +++ b/test/fixtures/NZ-BOP-2017.json @@ -27,6 +27,15 @@ "rule": "01-01 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2017-01-30 00:00:00", + "start": "2017-01-29T11:00:00.000Z", + "end": "2017-01-30T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2017-02-06 00:00:00", "start": "2017-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-BOP-2018.json b/test/fixtures/NZ-BOP-2018.json index c22e3531d..3c2c26f10 100644 --- a/test/fixtures/NZ-BOP-2018.json +++ b/test/fixtures/NZ-BOP-2018.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2018-01-29 00:00:00", + "start": "2018-01-28T11:00:00.000Z", + "end": "2018-01-29T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2018-02-06 00:00:00", "start": "2018-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-BOP-2019.json b/test/fixtures/NZ-BOP-2019.json index 6657dcafa..bfffe078d 100644 --- a/test/fixtures/NZ-BOP-2019.json +++ b/test/fixtures/NZ-BOP-2019.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Wed" }, + { + "date": "2019-01-28 00:00:00", + "start": "2019-01-27T11:00:00.000Z", + "end": "2019-01-28T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2019-02-06 00:00:00", "start": "2019-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-BOP-2020.json b/test/fixtures/NZ-BOP-2020.json index 86f9ef48a..14c03f991 100644 --- a/test/fixtures/NZ-BOP-2020.json +++ b/test/fixtures/NZ-BOP-2020.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Thu" }, + { + "date": "2020-01-27 00:00:00", + "start": "2020-01-26T11:00:00.000Z", + "end": "2020-01-27T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2020-02-06 00:00:00", "start": "2020-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-BOP-2021.json b/test/fixtures/NZ-BOP-2021.json index b6622958c..2f12beb4a 100644 --- a/test/fixtures/NZ-BOP-2021.json +++ b/test/fixtures/NZ-BOP-2021.json @@ -27,6 +27,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Mon" }, + { + "date": "2021-02-01 00:00:00", + "start": "2021-01-31T11:00:00.000Z", + "end": "2021-02-01T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2021-02-06 00:00:00", "start": "2021-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-BOP-2022.json b/test/fixtures/NZ-BOP-2022.json index 651cb1aa6..ab7ccc9b1 100644 --- a/test/fixtures/NZ-BOP-2022.json +++ b/test/fixtures/NZ-BOP-2022.json @@ -37,6 +37,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2022-01-31 00:00:00", + "start": "2022-01-30T11:00:00.000Z", + "end": "2022-01-31T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2022-02-06 00:00:00", "start": "2022-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-BOP-2023.json b/test/fixtures/NZ-BOP-2023.json index bb159b944..6bec3f021 100644 --- a/test/fixtures/NZ-BOP-2023.json +++ b/test/fixtures/NZ-BOP-2023.json @@ -27,6 +27,15 @@ "rule": "01-01 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2023-01-30 00:00:00", + "start": "2023-01-29T11:00:00.000Z", + "end": "2023-01-30T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2023-02-06 00:00:00", "start": "2023-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-BOP-2024.json b/test/fixtures/NZ-BOP-2024.json index bc12e9a14..48fcfc6aa 100644 --- a/test/fixtures/NZ-BOP-2024.json +++ b/test/fixtures/NZ-BOP-2024.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2024-01-29 00:00:00", + "start": "2024-01-28T11:00:00.000Z", + "end": "2024-01-29T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2024-02-06 00:00:00", "start": "2024-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-BOP-2025.json b/test/fixtures/NZ-BOP-2025.json index 692ba6a76..01601fb0a 100644 --- a/test/fixtures/NZ-BOP-2025.json +++ b/test/fixtures/NZ-BOP-2025.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Thu" }, + { + "date": "2025-01-27 00:00:00", + "start": "2025-01-26T11:00:00.000Z", + "end": "2025-01-27T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2025-02-06 00:00:00", "start": "2025-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-2015.json b/test/fixtures/NZ-CAN-2015.json index f11ad6f5e..ad18cf439 100644 --- a/test/fixtures/NZ-CAN-2015.json +++ b/test/fixtures/NZ-CAN-2015.json @@ -96,6 +96,7 @@ "end": "2015-11-13T11:00:00.000Z", "name": "Christchurch Show Day", "type": "public", + "note": "May differ in parts of North Canterbury", "rule": "friday after 2nd tuesday in November", "_weekday": "Fri" }, diff --git a/test/fixtures/NZ-CAN-2016.json b/test/fixtures/NZ-CAN-2016.json index eb77cb801..a6684f391 100644 --- a/test/fixtures/NZ-CAN-2016.json +++ b/test/fixtures/NZ-CAN-2016.json @@ -106,6 +106,7 @@ "end": "2016-11-11T11:00:00.000Z", "name": "Christchurch Show Day", "type": "public", + "note": "May differ in parts of North Canterbury", "rule": "friday after 2nd tuesday in November", "_weekday": "Fri" }, diff --git a/test/fixtures/NZ-CAN-2017.json b/test/fixtures/NZ-CAN-2017.json index e15f0a999..b377d1c0e 100644 --- a/test/fixtures/NZ-CAN-2017.json +++ b/test/fixtures/NZ-CAN-2017.json @@ -96,6 +96,7 @@ "end": "2017-11-17T11:00:00.000Z", "name": "Christchurch Show Day", "type": "public", + "note": "May differ in parts of North Canterbury", "rule": "friday after 2nd tuesday in November", "_weekday": "Fri" }, diff --git a/test/fixtures/NZ-CAN-2018.json b/test/fixtures/NZ-CAN-2018.json index dbf6e3190..82070c87b 100644 --- a/test/fixtures/NZ-CAN-2018.json +++ b/test/fixtures/NZ-CAN-2018.json @@ -86,6 +86,7 @@ "end": "2018-11-16T11:00:00.000Z", "name": "Christchurch Show Day", "type": "public", + "note": "May differ in parts of North Canterbury", "rule": "friday after 2nd tuesday in November", "_weekday": "Fri" }, diff --git a/test/fixtures/NZ-CAN-2019.json b/test/fixtures/NZ-CAN-2019.json index 414b634d0..75d5ab39c 100644 --- a/test/fixtures/NZ-CAN-2019.json +++ b/test/fixtures/NZ-CAN-2019.json @@ -86,6 +86,7 @@ "end": "2019-11-15T11:00:00.000Z", "name": "Christchurch Show Day", "type": "public", + "note": "May differ in parts of North Canterbury", "rule": "friday after 2nd tuesday in November", "_weekday": "Fri" }, diff --git a/test/fixtures/NZ-CAN-2020.json b/test/fixtures/NZ-CAN-2020.json index 1f41ddfb1..8d9c610d3 100644 --- a/test/fixtures/NZ-CAN-2020.json +++ b/test/fixtures/NZ-CAN-2020.json @@ -96,6 +96,7 @@ "end": "2020-11-13T11:00:00.000Z", "name": "Christchurch Show Day", "type": "public", + "note": "May differ in parts of North Canterbury", "rule": "friday after 2nd tuesday in November", "_weekday": "Fri" }, diff --git a/test/fixtures/NZ-CAN-2021.json b/test/fixtures/NZ-CAN-2021.json index 404049026..b7b5ac848 100644 --- a/test/fixtures/NZ-CAN-2021.json +++ b/test/fixtures/NZ-CAN-2021.json @@ -116,6 +116,7 @@ "end": "2021-11-12T11:00:00.000Z", "name": "Christchurch Show Day", "type": "public", + "note": "May differ in parts of North Canterbury", "rule": "friday after 2nd tuesday in November", "_weekday": "Fri" }, diff --git a/test/fixtures/NZ-CAN-2022.json b/test/fixtures/NZ-CAN-2022.json index c3ae8c2e2..f8bdc1fd1 100644 --- a/test/fixtures/NZ-CAN-2022.json +++ b/test/fixtures/NZ-CAN-2022.json @@ -125,6 +125,7 @@ "end": "2022-11-11T11:00:00.000Z", "name": "Christchurch Show Day", "type": "public", + "note": "May differ in parts of North Canterbury", "rule": "friday after 2nd tuesday in November", "_weekday": "Fri" }, diff --git a/test/fixtures/NZ-CAN-2023.json b/test/fixtures/NZ-CAN-2023.json index d98d153aa..975739b5a 100644 --- a/test/fixtures/NZ-CAN-2023.json +++ b/test/fixtures/NZ-CAN-2023.json @@ -105,6 +105,7 @@ "end": "2023-11-17T11:00:00.000Z", "name": "Christchurch Show Day", "type": "public", + "note": "May differ in parts of North Canterbury", "rule": "friday after 2nd tuesday in November", "_weekday": "Fri" }, diff --git a/test/fixtures/NZ-CAN-2024.json b/test/fixtures/NZ-CAN-2024.json index 8268bb17f..d28cbfe8f 100644 --- a/test/fixtures/NZ-CAN-2024.json +++ b/test/fixtures/NZ-CAN-2024.json @@ -95,6 +95,7 @@ "end": "2024-11-15T11:00:00.000Z", "name": "Christchurch Show Day", "type": "public", + "note": "May differ in parts of North Canterbury", "rule": "friday after 2nd tuesday in November", "_weekday": "Fri" }, diff --git a/test/fixtures/NZ-CAN-2025.json b/test/fixtures/NZ-CAN-2025.json index 432c9ec38..f5e3e089c 100644 --- a/test/fixtures/NZ-CAN-2025.json +++ b/test/fixtures/NZ-CAN-2025.json @@ -95,6 +95,7 @@ "end": "2025-11-14T11:00:00.000Z", "name": "Christchurch Show Day", "type": "public", + "note": "May differ in parts of North Canterbury", "rule": "friday after 2nd tuesday in November", "_weekday": "Fri" }, diff --git a/test/fixtures/NZ-CAN-Timaru-2015.json b/test/fixtures/NZ-CAN-Timaru-2015.json new file mode 100644 index 000000000..ad18cf439 --- /dev/null +++ b/test/fixtures/NZ-CAN-Timaru-2015.json @@ -0,0 +1,131 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T11:00:00.000Z", + "end": "2015-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2015-01-02 00:00:00", + "start": "2015-01-01T11:00:00.000Z", + "end": "2015-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2015-02-06 00:00:00", + "start": "2015-02-05T11:00:00.000Z", + "end": "2015-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T11:00:00.000Z", + "end": "2015-04-03T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T11:00:00.000Z", + "end": "2015-04-05T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-04-06 00:00:00", + "start": "2015-04-05T12:00:00.000Z", + "end": "2015-04-06T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2015-04-25 00:00:00", + "start": "2015-04-24T12:00:00.000Z", + "end": "2015-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2015-04-27 00:00:00", + "start": "2015-04-26T12:00:00.000Z", + "end": "2015-04-27T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-06-01 00:00:00", + "start": "2015-05-31T12:00:00.000Z", + "end": "2015-06-01T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2015-10-26 00:00:00", + "start": "2015-10-25T11:00:00.000Z", + "end": "2015-10-26T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2015-11-13 00:00:00", + "start": "2015-11-12T11:00:00.000Z", + "end": "2015-11-13T11:00:00.000Z", + "name": "Christchurch Show Day", + "type": "public", + "note": "May differ in parts of North Canterbury", + "rule": "friday after 2nd tuesday in November", + "_weekday": "Fri" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T11:00:00.000Z", + "end": "2015-12-25T11: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": "2015-12-26 00:00:00", + "start": "2015-12-25T11:00:00.000Z", + "end": "2015-12-26T11: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": "2015-12-28 00:00:00", + "start": "2015-12-27T11:00:00.000Z", + "end": "2015-12-28T11: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/NZ-CAN-Timaru-2016.json b/test/fixtures/NZ-CAN-Timaru-2016.json new file mode 100644 index 000000000..a6684f391 --- /dev/null +++ b/test/fixtures/NZ-CAN-Timaru-2016.json @@ -0,0 +1,141 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T11:00:00.000Z", + "end": "2016-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2016-01-02 00:00:00", + "start": "2016-01-01T11:00:00.000Z", + "end": "2016-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2016-01-04 00:00:00", + "start": "2016-01-03T11:00:00.000Z", + "end": "2016-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2016-02-06 00:00:00", + "start": "2016-02-05T11:00:00.000Z", + "end": "2016-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2016-02-08 00:00:00", + "start": "2016-02-07T11:00:00.000Z", + "end": "2016-02-08T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T11:00:00.000Z", + "end": "2016-03-25T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T11:00:00.000Z", + "end": "2016-03-27T11:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-03-28 00:00:00", + "start": "2016-03-27T11:00:00.000Z", + "end": "2016-03-28T11:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2016-04-25 00:00:00", + "start": "2016-04-24T12:00:00.000Z", + "end": "2016-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2016-06-06 00:00:00", + "start": "2016-06-05T12:00:00.000Z", + "end": "2016-06-06T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2016-10-24 00:00:00", + "start": "2016-10-23T11:00:00.000Z", + "end": "2016-10-24T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2016-11-11 00:00:00", + "start": "2016-11-10T11:00:00.000Z", + "end": "2016-11-11T11:00:00.000Z", + "name": "Christchurch Show Day", + "type": "public", + "note": "May differ in parts of North Canterbury", + "rule": "friday after 2nd tuesday in November", + "_weekday": "Fri" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T11:00:00.000Z", + "end": "2016-12-25T11: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": "2016-12-26 00:00:00", + "start": "2016-12-25T11:00:00.000Z", + "end": "2016-12-26T11: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": "2016-12-27 00:00:00", + "start": "2016-12-26T11:00:00.000Z", + "end": "2016-12-27T11: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/NZ-CAN-Timaru-2017.json b/test/fixtures/NZ-CAN-Timaru-2017.json new file mode 100644 index 000000000..b377d1c0e --- /dev/null +++ b/test/fixtures/NZ-CAN-Timaru-2017.json @@ -0,0 +1,121 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T11:00:00.000Z", + "end": "2017-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T11:00:00.000Z", + "end": "2017-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2017-01-03 00:00:00", + "start": "2017-01-02T11:00:00.000Z", + "end": "2017-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2017-02-06 00:00:00", + "start": "2017-02-05T11:00:00.000Z", + "end": "2017-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T12:00:00.000Z", + "end": "2017-04-14T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T12:00:00.000Z", + "end": "2017-04-16T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-04-17 00:00:00", + "start": "2017-04-16T12:00:00.000Z", + "end": "2017-04-17T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2017-04-25 00:00:00", + "start": "2017-04-24T12:00:00.000Z", + "end": "2017-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2017-06-05 00:00:00", + "start": "2017-06-04T12:00:00.000Z", + "end": "2017-06-05T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2017-10-23 00:00:00", + "start": "2017-10-22T11:00:00.000Z", + "end": "2017-10-23T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2017-11-17 00:00:00", + "start": "2017-11-16T11:00:00.000Z", + "end": "2017-11-17T11:00:00.000Z", + "name": "Christchurch Show Day", + "type": "public", + "note": "May differ in parts of North Canterbury", + "rule": "friday after 2nd tuesday in November", + "_weekday": "Fri" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T11:00:00.000Z", + "end": "2017-12-25T11: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": "2017-12-26 00:00:00", + "start": "2017-12-25T11:00:00.000Z", + "end": "2017-12-26T11: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/NZ-CAN-Timaru-2018.json b/test/fixtures/NZ-CAN-Timaru-2018.json new file mode 100644 index 000000000..82070c87b --- /dev/null +++ b/test/fixtures/NZ-CAN-Timaru-2018.json @@ -0,0 +1,111 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T11:00:00.000Z", + "end": "2018-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2018-01-02 00:00:00", + "start": "2018-01-01T11:00:00.000Z", + "end": "2018-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2018-02-06 00:00:00", + "start": "2018-02-05T11:00:00.000Z", + "end": "2018-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T11:00:00.000Z", + "end": "2018-03-30T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T11:00:00.000Z", + "end": "2018-04-01T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-04-02 00:00:00", + "start": "2018-04-01T12:00:00.000Z", + "end": "2018-04-02T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2018-04-25 00:00:00", + "start": "2018-04-24T12:00:00.000Z", + "end": "2018-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2018-06-04 00:00:00", + "start": "2018-06-03T12:00:00.000Z", + "end": "2018-06-04T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2018-10-22 00:00:00", + "start": "2018-10-21T11:00:00.000Z", + "end": "2018-10-22T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2018-11-16 00:00:00", + "start": "2018-11-15T11:00:00.000Z", + "end": "2018-11-16T11:00:00.000Z", + "name": "Christchurch Show Day", + "type": "public", + "note": "May differ in parts of North Canterbury", + "rule": "friday after 2nd tuesday in November", + "_weekday": "Fri" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T11:00:00.000Z", + "end": "2018-12-25T11:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2018-12-26 00:00:00", + "start": "2018-12-25T11:00:00.000Z", + "end": "2018-12-26T11:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/NZ-CAN-Timaru-2019.json b/test/fixtures/NZ-CAN-Timaru-2019.json new file mode 100644 index 000000000..75d5ab39c --- /dev/null +++ b/test/fixtures/NZ-CAN-Timaru-2019.json @@ -0,0 +1,111 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T11:00:00.000Z", + "end": "2019-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2019-01-02 00:00:00", + "start": "2019-01-01T11:00:00.000Z", + "end": "2019-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2019-02-06 00:00:00", + "start": "2019-02-05T11:00:00.000Z", + "end": "2019-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T12:00:00.000Z", + "end": "2019-04-19T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T12:00:00.000Z", + "end": "2019-04-21T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-04-22 00:00:00", + "start": "2019-04-21T12:00:00.000Z", + "end": "2019-04-22T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2019-04-25 00:00:00", + "start": "2019-04-24T12:00:00.000Z", + "end": "2019-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2019-06-03 00:00:00", + "start": "2019-06-02T12:00:00.000Z", + "end": "2019-06-03T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2019-10-28 00:00:00", + "start": "2019-10-27T11:00:00.000Z", + "end": "2019-10-28T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2019-11-15 00:00:00", + "start": "2019-11-14T11:00:00.000Z", + "end": "2019-11-15T11:00:00.000Z", + "name": "Christchurch Show Day", + "type": "public", + "note": "May differ in parts of North Canterbury", + "rule": "friday after 2nd tuesday in November", + "_weekday": "Fri" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T11:00:00.000Z", + "end": "2019-12-25T11: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-25T11:00:00.000Z", + "end": "2019-12-26T11: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/NZ-CAN-Timaru-2020.json b/test/fixtures/NZ-CAN-Timaru-2020.json new file mode 100644 index 000000000..8d9c610d3 --- /dev/null +++ b/test/fixtures/NZ-CAN-Timaru-2020.json @@ -0,0 +1,131 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T11:00:00.000Z", + "end": "2020-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2020-01-02 00:00:00", + "start": "2020-01-01T11:00:00.000Z", + "end": "2020-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2020-02-06 00:00:00", + "start": "2020-02-05T11:00:00.000Z", + "end": "2020-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T12:00:00.000Z", + "end": "2020-04-10T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T12:00:00.000Z", + "end": "2020-04-12T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-04-13 00:00:00", + "start": "2020-04-12T12:00:00.000Z", + "end": "2020-04-13T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2020-04-25 00:00:00", + "start": "2020-04-24T12:00:00.000Z", + "end": "2020-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2020-04-27 00:00:00", + "start": "2020-04-26T12:00:00.000Z", + "end": "2020-04-27T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-06-01 00:00:00", + "start": "2020-05-31T12:00:00.000Z", + "end": "2020-06-01T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2020-10-26 00:00:00", + "start": "2020-10-25T11:00:00.000Z", + "end": "2020-10-26T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2020-11-13 00:00:00", + "start": "2020-11-12T11:00:00.000Z", + "end": "2020-11-13T11:00:00.000Z", + "name": "Christchurch Show Day", + "type": "public", + "note": "May differ in parts of North Canterbury", + "rule": "friday after 2nd tuesday in November", + "_weekday": "Fri" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T11:00:00.000Z", + "end": "2020-12-25T11: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-25T11:00:00.000Z", + "end": "2020-12-26T11: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-27T11:00:00.000Z", + "end": "2020-12-28T11: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/NZ-CAN-Timaru-2021.json b/test/fixtures/NZ-CAN-Timaru-2021.json new file mode 100644 index 000000000..b7b5ac848 --- /dev/null +++ b/test/fixtures/NZ-CAN-Timaru-2021.json @@ -0,0 +1,161 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T11:00:00.000Z", + "end": "2021-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2021-01-02 00:00:00", + "start": "2021-01-01T11:00:00.000Z", + "end": "2021-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2021-01-04 00:00:00", + "start": "2021-01-03T11:00:00.000Z", + "end": "2021-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2021-02-06 00:00:00", + "start": "2021-02-05T11:00:00.000Z", + "end": "2021-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2021-02-08 00:00:00", + "start": "2021-02-07T11:00:00.000Z", + "end": "2021-02-08T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T11:00:00.000Z", + "end": "2021-04-02T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T11:00:00.000Z", + "end": "2021-04-04T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-04-05 00:00:00", + "start": "2021-04-04T12:00:00.000Z", + "end": "2021-04-05T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2021-04-25 00:00:00", + "start": "2021-04-24T12:00:00.000Z", + "end": "2021-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Sun" + }, + { + "date": "2021-04-26 00:00:00", + "start": "2021-04-25T12:00:00.000Z", + "end": "2021-04-26T12:00:00.000Z", + "name": "ANZAC Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2021-06-07 00:00:00", + "start": "2021-06-06T12:00:00.000Z", + "end": "2021-06-07T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2021-10-25 00:00:00", + "start": "2021-10-24T11:00:00.000Z", + "end": "2021-10-25T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2021-11-12 00:00:00", + "start": "2021-11-11T11:00:00.000Z", + "end": "2021-11-12T11:00:00.000Z", + "name": "Christchurch Show Day", + "type": "public", + "note": "May differ in parts of North Canterbury", + "rule": "friday after 2nd tuesday in November", + "_weekday": "Fri" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T11:00:00.000Z", + "end": "2021-12-25T11: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-25T11:00:00.000Z", + "end": "2021-12-26T11: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-26T11:00:00.000Z", + "end": "2021-12-27T11: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-27T11:00:00.000Z", + "end": "2021-12-28T11: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/NZ-CAN-Timaru-2022.json b/test/fixtures/NZ-CAN-Timaru-2022.json new file mode 100644 index 000000000..f8bdc1fd1 --- /dev/null +++ b/test/fixtures/NZ-CAN-Timaru-2022.json @@ -0,0 +1,160 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T11:00:00.000Z", + "end": "2022-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2022-01-02 00:00:00", + "start": "2022-01-01T11:00:00.000Z", + "end": "2022-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2022-01-03 00:00:00", + "start": "2022-01-02T11:00:00.000Z", + "end": "2022-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2022-01-04 00:00:00", + "start": "2022-01-03T11:00:00.000Z", + "end": "2022-01-04T11:00:00.000Z", + "name": "Day after New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2022-02-06 00:00:00", + "start": "2022-02-05T11:00:00.000Z", + "end": "2022-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Sun" + }, + { + "date": "2022-02-07 00:00:00", + "start": "2022-02-06T11:00:00.000Z", + "end": "2022-02-07T11:00:00.000Z", + "name": "Waitangi Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T12:00:00.000Z", + "end": "2022-04-15T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T12:00:00.000Z", + "end": "2022-04-17T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-04-18 00:00:00", + "start": "2022-04-17T12:00:00.000Z", + "end": "2022-04-18T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2022-04-25 00:00:00", + "start": "2022-04-24T12:00:00.000Z", + "end": "2022-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-06-06 00:00:00", + "start": "2022-06-05T12:00:00.000Z", + "end": "2022-06-06T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2022-06-24 00:00:00", + "start": "2022-06-23T12:00:00.000Z", + "end": "2022-06-24T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2022-06-24", + "_weekday": "Fri" + }, + { + "date": "2022-10-24 00:00:00", + "start": "2022-10-23T11:00:00.000Z", + "end": "2022-10-24T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2022-11-11 00:00:00", + "start": "2022-11-10T11:00:00.000Z", + "end": "2022-11-11T11:00:00.000Z", + "name": "Christchurch Show Day", + "type": "public", + "note": "May differ in parts of North Canterbury", + "rule": "friday after 2nd tuesday in November", + "_weekday": "Fri" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T11:00:00.000Z", + "end": "2022-12-25T11: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-25T11:00:00.000Z", + "end": "2022-12-26T11: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-26T11:00:00.000Z", + "end": "2022-12-27T11: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/NZ-CAN-Timaru-2023.json b/test/fixtures/NZ-CAN-Timaru-2023.json new file mode 100644 index 000000000..975739b5a --- /dev/null +++ b/test/fixtures/NZ-CAN-Timaru-2023.json @@ -0,0 +1,130 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T11:00:00.000Z", + "end": "2023-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T11:00:00.000Z", + "end": "2023-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2023-01-03 00:00:00", + "start": "2023-01-02T11:00:00.000Z", + "end": "2023-01-03T11:00:00.000Z", + "name": "New Year's Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2023-02-06 00:00:00", + "start": "2023-02-05T11:00:00.000Z", + "end": "2023-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T12:00:00.000Z", + "end": "2023-04-07T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T12:00:00.000Z", + "end": "2023-04-09T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-04-10 00:00:00", + "start": "2023-04-09T12:00:00.000Z", + "end": "2023-04-10T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2023-04-25 00:00:00", + "start": "2023-04-24T12:00:00.000Z", + "end": "2023-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2023-06-05 00:00:00", + "start": "2023-06-04T12:00:00.000Z", + "end": "2023-06-05T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2023-07-14 00:00:00", + "start": "2023-07-13T12:00:00.000Z", + "end": "2023-07-14T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2023-07-14", + "_weekday": "Fri" + }, + { + "date": "2023-10-23 00:00:00", + "start": "2023-10-22T11:00:00.000Z", + "end": "2023-10-23T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2023-11-17 00:00:00", + "start": "2023-11-16T11:00:00.000Z", + "end": "2023-11-17T11:00:00.000Z", + "name": "Christchurch Show Day", + "type": "public", + "note": "May differ in parts of North Canterbury", + "rule": "friday after 2nd tuesday in November", + "_weekday": "Fri" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T11:00:00.000Z", + "end": "2023-12-25T11: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-25T11:00:00.000Z", + "end": "2023-12-26T11: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/NZ-CAN-Timaru-2024.json b/test/fixtures/NZ-CAN-Timaru-2024.json new file mode 100644 index 000000000..d28cbfe8f --- /dev/null +++ b/test/fixtures/NZ-CAN-Timaru-2024.json @@ -0,0 +1,120 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T11:00:00.000Z", + "end": "2024-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2024-01-02 00:00:00", + "start": "2024-01-01T11:00:00.000Z", + "end": "2024-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + }, + { + "date": "2024-02-06 00:00:00", + "start": "2024-02-05T11:00:00.000Z", + "end": "2024-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T11:00:00.000Z", + "end": "2024-03-29T11:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T11:00:00.000Z", + "end": "2024-03-31T11:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-04-01 00:00:00", + "start": "2024-03-31T11:00:00.000Z", + "end": "2024-04-01T11:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2024-04-25 00:00:00", + "start": "2024-04-24T12:00:00.000Z", + "end": "2024-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2024-06-03 00:00:00", + "start": "2024-06-02T12:00:00.000Z", + "end": "2024-06-03T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T12:00:00.000Z", + "end": "2024-06-28T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2024-06-28", + "_weekday": "Fri" + }, + { + "date": "2024-10-28 00:00:00", + "start": "2024-10-27T11:00:00.000Z", + "end": "2024-10-28T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2024-11-15 00:00:00", + "start": "2024-11-14T11:00:00.000Z", + "end": "2024-11-15T11:00:00.000Z", + "name": "Christchurch Show Day", + "type": "public", + "note": "May differ in parts of North Canterbury", + "rule": "friday after 2nd tuesday in November", + "_weekday": "Fri" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T11:00:00.000Z", + "end": "2024-12-25T11: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-25T11:00:00.000Z", + "end": "2024-12-26T11: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/NZ-CAN-Timaru-2025.json b/test/fixtures/NZ-CAN-Timaru-2025.json new file mode 100644 index 000000000..f5e3e089c --- /dev/null +++ b/test/fixtures/NZ-CAN-Timaru-2025.json @@ -0,0 +1,120 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T11:00:00.000Z", + "end": "2025-01-01T11:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2025-01-02 00:00:00", + "start": "2025-01-01T11:00:00.000Z", + "end": "2025-01-02T11:00:00.000Z", + "name": "Day after New Year's Day", + "type": "public", + "rule": "01-02 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + }, + { + "date": "2025-02-06 00:00:00", + "start": "2025-02-05T11:00:00.000Z", + "end": "2025-02-06T11:00:00.000Z", + "name": "Waitangi Day", + "type": "public", + "rule": "02-06 and if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T12:00:00.000Z", + "end": "2025-04-18T12:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T12:00:00.000Z", + "end": "2025-04-20T12:00:00.000Z", + "name": "Easter Sunday", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-04-21 00:00:00", + "start": "2025-04-20T12:00:00.000Z", + "end": "2025-04-21T12:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2025-04-25 00:00:00", + "start": "2025-04-24T12:00:00.000Z", + "end": "2025-04-25T12:00:00.000Z", + "name": "ANZAC Day", + "type": "public", + "rule": "04-25 and if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2025-06-02 00:00:00", + "start": "2025-06-01T12:00:00.000Z", + "end": "2025-06-02T12:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "1st monday in June", + "_weekday": "Mon" + }, + { + "date": "2025-06-20 00:00:00", + "start": "2025-06-19T12:00:00.000Z", + "end": "2025-06-20T12:00:00.000Z", + "name": "Matariki", + "type": "public", + "rule": "2025-06-20", + "_weekday": "Fri" + }, + { + "date": "2025-10-27 00:00:00", + "start": "2025-10-26T11:00:00.000Z", + "end": "2025-10-27T11:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "4th monday in October", + "_weekday": "Mon" + }, + { + "date": "2025-11-14 00:00:00", + "start": "2025-11-13T11:00:00.000Z", + "end": "2025-11-14T11:00:00.000Z", + "name": "Christchurch Show Day", + "type": "public", + "note": "May differ in parts of North Canterbury", + "rule": "friday after 2nd tuesday in November", + "_weekday": "Fri" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T11:00:00.000Z", + "end": "2025-12-25T11: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-25T11:00:00.000Z", + "end": "2025-12-26T11: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 diff --git a/test/fixtures/NZ-GIS-2015.json b/test/fixtures/NZ-GIS-2015.json index c0a06d0bd..1b59e5949 100644 --- a/test/fixtures/NZ-GIS-2015.json +++ b/test/fixtures/NZ-GIS-2015.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Fri" }, + { + "date": "2015-01-26 00:00:00", + "start": "2015-01-25T11:00:00.000Z", + "end": "2015-01-26T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2015-02-06 00:00:00", "start": "2015-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-GIS-2016.json b/test/fixtures/NZ-GIS-2016.json index b7b23d51f..e770c1188 100644 --- a/test/fixtures/NZ-GIS-2016.json +++ b/test/fixtures/NZ-GIS-2016.json @@ -27,6 +27,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Mon" }, + { + "date": "2016-02-01 00:00:00", + "start": "2016-01-31T11:00:00.000Z", + "end": "2016-02-01T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2016-02-06 00:00:00", "start": "2016-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-GIS-2017.json b/test/fixtures/NZ-GIS-2017.json index 4c815ea98..68a433526 100644 --- a/test/fixtures/NZ-GIS-2017.json +++ b/test/fixtures/NZ-GIS-2017.json @@ -27,6 +27,15 @@ "rule": "01-01 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2017-01-30 00:00:00", + "start": "2017-01-29T11:00:00.000Z", + "end": "2017-01-30T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2017-02-06 00:00:00", "start": "2017-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-GIS-2018.json b/test/fixtures/NZ-GIS-2018.json index c22e3531d..3c2c26f10 100644 --- a/test/fixtures/NZ-GIS-2018.json +++ b/test/fixtures/NZ-GIS-2018.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2018-01-29 00:00:00", + "start": "2018-01-28T11:00:00.000Z", + "end": "2018-01-29T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2018-02-06 00:00:00", "start": "2018-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-GIS-2019.json b/test/fixtures/NZ-GIS-2019.json index 6657dcafa..bfffe078d 100644 --- a/test/fixtures/NZ-GIS-2019.json +++ b/test/fixtures/NZ-GIS-2019.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Wed" }, + { + "date": "2019-01-28 00:00:00", + "start": "2019-01-27T11:00:00.000Z", + "end": "2019-01-28T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2019-02-06 00:00:00", "start": "2019-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-GIS-2020.json b/test/fixtures/NZ-GIS-2020.json index 86f9ef48a..14c03f991 100644 --- a/test/fixtures/NZ-GIS-2020.json +++ b/test/fixtures/NZ-GIS-2020.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Thu" }, + { + "date": "2020-01-27 00:00:00", + "start": "2020-01-26T11:00:00.000Z", + "end": "2020-01-27T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2020-02-06 00:00:00", "start": "2020-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-GIS-2021.json b/test/fixtures/NZ-GIS-2021.json index b6622958c..2f12beb4a 100644 --- a/test/fixtures/NZ-GIS-2021.json +++ b/test/fixtures/NZ-GIS-2021.json @@ -27,6 +27,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Mon" }, + { + "date": "2021-02-01 00:00:00", + "start": "2021-01-31T11:00:00.000Z", + "end": "2021-02-01T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2021-02-06 00:00:00", "start": "2021-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-GIS-2022.json b/test/fixtures/NZ-GIS-2022.json index 651cb1aa6..ab7ccc9b1 100644 --- a/test/fixtures/NZ-GIS-2022.json +++ b/test/fixtures/NZ-GIS-2022.json @@ -37,6 +37,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2022-01-31 00:00:00", + "start": "2022-01-30T11:00:00.000Z", + "end": "2022-01-31T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2022-02-06 00:00:00", "start": "2022-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-GIS-2023.json b/test/fixtures/NZ-GIS-2023.json index bb159b944..6bec3f021 100644 --- a/test/fixtures/NZ-GIS-2023.json +++ b/test/fixtures/NZ-GIS-2023.json @@ -27,6 +27,15 @@ "rule": "01-01 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2023-01-30 00:00:00", + "start": "2023-01-29T11:00:00.000Z", + "end": "2023-01-30T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2023-02-06 00:00:00", "start": "2023-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-GIS-2024.json b/test/fixtures/NZ-GIS-2024.json index bc12e9a14..48fcfc6aa 100644 --- a/test/fixtures/NZ-GIS-2024.json +++ b/test/fixtures/NZ-GIS-2024.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2024-01-29 00:00:00", + "start": "2024-01-28T11:00:00.000Z", + "end": "2024-01-29T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2024-02-06 00:00:00", "start": "2024-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-GIS-2025.json b/test/fixtures/NZ-GIS-2025.json index 692ba6a76..01601fb0a 100644 --- a/test/fixtures/NZ-GIS-2025.json +++ b/test/fixtures/NZ-GIS-2025.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Thu" }, + { + "date": "2025-01-27 00:00:00", + "start": "2025-01-26T11:00:00.000Z", + "end": "2025-01-27T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2025-02-06 00:00:00", "start": "2025-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-MWT-2015.json b/test/fixtures/NZ-MWT-2015.json index c0a06d0bd..02d562298 100644 --- a/test/fixtures/NZ-MWT-2015.json +++ b/test/fixtures/NZ-MWT-2015.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Fri" }, + { + "date": "2015-01-19 00:00:00", + "start": "2015-01-18T11:00:00.000Z", + "end": "2015-01-19T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-22 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2015-02-06 00:00:00", "start": "2015-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-MWT-2016.json b/test/fixtures/NZ-MWT-2016.json index b7b23d51f..c598119af 100644 --- a/test/fixtures/NZ-MWT-2016.json +++ b/test/fixtures/NZ-MWT-2016.json @@ -27,6 +27,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Mon" }, + { + "date": "2016-01-25 00:00:00", + "start": "2016-01-24T11:00:00.000Z", + "end": "2016-01-25T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-22 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2016-02-06 00:00:00", "start": "2016-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-MWT-2017.json b/test/fixtures/NZ-MWT-2017.json index 4c815ea98..b54595f12 100644 --- a/test/fixtures/NZ-MWT-2017.json +++ b/test/fixtures/NZ-MWT-2017.json @@ -27,6 +27,15 @@ "rule": "01-01 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2017-01-23 00:00:00", + "start": "2017-01-22T11:00:00.000Z", + "end": "2017-01-23T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-22 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2017-02-06 00:00:00", "start": "2017-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-MWT-2018.json b/test/fixtures/NZ-MWT-2018.json index c22e3531d..652e95cb7 100644 --- a/test/fixtures/NZ-MWT-2018.json +++ b/test/fixtures/NZ-MWT-2018.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2018-01-22 00:00:00", + "start": "2018-01-21T11:00:00.000Z", + "end": "2018-01-22T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-22 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2018-02-06 00:00:00", "start": "2018-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-MWT-2019.json b/test/fixtures/NZ-MWT-2019.json index 6657dcafa..4cd2b6d53 100644 --- a/test/fixtures/NZ-MWT-2019.json +++ b/test/fixtures/NZ-MWT-2019.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Wed" }, + { + "date": "2019-01-21 00:00:00", + "start": "2019-01-20T11:00:00.000Z", + "end": "2019-01-21T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-22 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2019-02-06 00:00:00", "start": "2019-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-MWT-2020.json b/test/fixtures/NZ-MWT-2020.json index 86f9ef48a..9a54ea418 100644 --- a/test/fixtures/NZ-MWT-2020.json +++ b/test/fixtures/NZ-MWT-2020.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Thu" }, + { + "date": "2020-01-20 00:00:00", + "start": "2020-01-19T11:00:00.000Z", + "end": "2020-01-20T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-22 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2020-02-06 00:00:00", "start": "2020-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-MWT-2021.json b/test/fixtures/NZ-MWT-2021.json index b6622958c..187c33c07 100644 --- a/test/fixtures/NZ-MWT-2021.json +++ b/test/fixtures/NZ-MWT-2021.json @@ -27,6 +27,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Mon" }, + { + "date": "2021-01-25 00:00:00", + "start": "2021-01-24T11:00:00.000Z", + "end": "2021-01-25T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-22 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2021-02-06 00:00:00", "start": "2021-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-MWT-2022.json b/test/fixtures/NZ-MWT-2022.json index 651cb1aa6..efc94dda4 100644 --- a/test/fixtures/NZ-MWT-2022.json +++ b/test/fixtures/NZ-MWT-2022.json @@ -37,6 +37,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2022-01-24 00:00:00", + "start": "2022-01-23T11:00:00.000Z", + "end": "2022-01-24T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-22 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2022-02-06 00:00:00", "start": "2022-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-MWT-2023.json b/test/fixtures/NZ-MWT-2023.json index bb159b944..a64d57c2b 100644 --- a/test/fixtures/NZ-MWT-2023.json +++ b/test/fixtures/NZ-MWT-2023.json @@ -27,6 +27,15 @@ "rule": "01-01 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2023-01-23 00:00:00", + "start": "2023-01-22T11:00:00.000Z", + "end": "2023-01-23T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-22 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2023-02-06 00:00:00", "start": "2023-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-MWT-2024.json b/test/fixtures/NZ-MWT-2024.json index bc12e9a14..0553cfc95 100644 --- a/test/fixtures/NZ-MWT-2024.json +++ b/test/fixtures/NZ-MWT-2024.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2024-01-22 00:00:00", + "start": "2024-01-21T11:00:00.000Z", + "end": "2024-01-22T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-22 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2024-02-06 00:00:00", "start": "2024-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-MWT-2025.json b/test/fixtures/NZ-MWT-2025.json index 692ba6a76..200dc9e16 100644 --- a/test/fixtures/NZ-MWT-2025.json +++ b/test/fixtures/NZ-MWT-2025.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Thu" }, + { + "date": "2025-01-20 00:00:00", + "start": "2025-01-19T11:00:00.000Z", + "end": "2025-01-20T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-22 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2025-02-06 00:00:00", "start": "2025-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-TAS-2015.json b/test/fixtures/NZ-TAS-2015.json index c0a06d0bd..b5b8eb0df 100644 --- a/test/fixtures/NZ-TAS-2015.json +++ b/test/fixtures/NZ-TAS-2015.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Fri" }, + { + "date": "2015-02-02 00:00:00", + "start": "2015-02-01T11:00:00.000Z", + "end": "2015-02-02T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "02-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2015-02-06 00:00:00", "start": "2015-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-TAS-2016.json b/test/fixtures/NZ-TAS-2016.json index b7b23d51f..a7e71c8de 100644 --- a/test/fixtures/NZ-TAS-2016.json +++ b/test/fixtures/NZ-TAS-2016.json @@ -27,6 +27,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Mon" }, + { + "date": "2016-02-01 00:00:00", + "start": "2016-01-31T11:00:00.000Z", + "end": "2016-02-01T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "02-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2016-02-06 00:00:00", "start": "2016-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-TAS-2017.json b/test/fixtures/NZ-TAS-2017.json index 4c815ea98..21b61f03e 100644 --- a/test/fixtures/NZ-TAS-2017.json +++ b/test/fixtures/NZ-TAS-2017.json @@ -27,6 +27,15 @@ "rule": "01-01 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2017-01-30 00:00:00", + "start": "2017-01-29T11:00:00.000Z", + "end": "2017-01-30T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "02-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2017-02-06 00:00:00", "start": "2017-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-TAS-2018.json b/test/fixtures/NZ-TAS-2018.json index c22e3531d..dd3e8e868 100644 --- a/test/fixtures/NZ-TAS-2018.json +++ b/test/fixtures/NZ-TAS-2018.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2018-01-29 00:00:00", + "start": "2018-01-28T11:00:00.000Z", + "end": "2018-01-29T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "02-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2018-02-06 00:00:00", "start": "2018-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-TAS-2019.json b/test/fixtures/NZ-TAS-2019.json index 6657dcafa..7a23d3033 100644 --- a/test/fixtures/NZ-TAS-2019.json +++ b/test/fixtures/NZ-TAS-2019.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Wed" }, + { + "date": "2019-02-04 00:00:00", + "start": "2019-02-03T11:00:00.000Z", + "end": "2019-02-04T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "02-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2019-02-06 00:00:00", "start": "2019-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-TAS-2020.json b/test/fixtures/NZ-TAS-2020.json index 86f9ef48a..4f9dd6ceb 100644 --- a/test/fixtures/NZ-TAS-2020.json +++ b/test/fixtures/NZ-TAS-2020.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Thu" }, + { + "date": "2020-02-03 00:00:00", + "start": "2020-02-02T11:00:00.000Z", + "end": "2020-02-03T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "02-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2020-02-06 00:00:00", "start": "2020-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-TAS-2021.json b/test/fixtures/NZ-TAS-2021.json index b6622958c..ec896d36a 100644 --- a/test/fixtures/NZ-TAS-2021.json +++ b/test/fixtures/NZ-TAS-2021.json @@ -27,6 +27,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Mon" }, + { + "date": "2021-02-01 00:00:00", + "start": "2021-01-31T11:00:00.000Z", + "end": "2021-02-01T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "02-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2021-02-06 00:00:00", "start": "2021-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-TAS-2022.json b/test/fixtures/NZ-TAS-2022.json index 651cb1aa6..3447219ed 100644 --- a/test/fixtures/NZ-TAS-2022.json +++ b/test/fixtures/NZ-TAS-2022.json @@ -37,6 +37,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2022-01-31 00:00:00", + "start": "2022-01-30T11:00:00.000Z", + "end": "2022-01-31T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "02-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2022-02-06 00:00:00", "start": "2022-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-TAS-2023.json b/test/fixtures/NZ-TAS-2023.json index bb159b944..020ff28ab 100644 --- a/test/fixtures/NZ-TAS-2023.json +++ b/test/fixtures/NZ-TAS-2023.json @@ -27,6 +27,15 @@ "rule": "01-01 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2023-01-30 00:00:00", + "start": "2023-01-29T11:00:00.000Z", + "end": "2023-01-30T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "02-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2023-02-06 00:00:00", "start": "2023-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-TAS-2024.json b/test/fixtures/NZ-TAS-2024.json index bc12e9a14..6429c45d1 100644 --- a/test/fixtures/NZ-TAS-2024.json +++ b/test/fixtures/NZ-TAS-2024.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2024-01-29 00:00:00", + "start": "2024-01-28T11:00:00.000Z", + "end": "2024-01-29T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "02-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2024-02-06 00:00:00", "start": "2024-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-TAS-2025.json b/test/fixtures/NZ-TAS-2025.json index 692ba6a76..942b8191b 100644 --- a/test/fixtures/NZ-TAS-2025.json +++ b/test/fixtures/NZ-TAS-2025.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Thu" }, + { + "date": "2025-02-03 00:00:00", + "start": "2025-02-02T11:00:00.000Z", + "end": "2025-02-03T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "02-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2025-02-06 00:00:00", "start": "2025-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-WKO-2015.json b/test/fixtures/NZ-WKO-2015.json index c0a06d0bd..1b59e5949 100644 --- a/test/fixtures/NZ-WKO-2015.json +++ b/test/fixtures/NZ-WKO-2015.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Fri" }, + { + "date": "2015-01-26 00:00:00", + "start": "2015-01-25T11:00:00.000Z", + "end": "2015-01-26T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2015-02-06 00:00:00", "start": "2015-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-WKO-2016.json b/test/fixtures/NZ-WKO-2016.json index b7b23d51f..e770c1188 100644 --- a/test/fixtures/NZ-WKO-2016.json +++ b/test/fixtures/NZ-WKO-2016.json @@ -27,6 +27,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Mon" }, + { + "date": "2016-02-01 00:00:00", + "start": "2016-01-31T11:00:00.000Z", + "end": "2016-02-01T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2016-02-06 00:00:00", "start": "2016-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-WKO-2017.json b/test/fixtures/NZ-WKO-2017.json index 4c815ea98..68a433526 100644 --- a/test/fixtures/NZ-WKO-2017.json +++ b/test/fixtures/NZ-WKO-2017.json @@ -27,6 +27,15 @@ "rule": "01-01 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2017-01-30 00:00:00", + "start": "2017-01-29T11:00:00.000Z", + "end": "2017-01-30T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2017-02-06 00:00:00", "start": "2017-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-WKO-2018.json b/test/fixtures/NZ-WKO-2018.json index c22e3531d..3c2c26f10 100644 --- a/test/fixtures/NZ-WKO-2018.json +++ b/test/fixtures/NZ-WKO-2018.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2018-01-29 00:00:00", + "start": "2018-01-28T11:00:00.000Z", + "end": "2018-01-29T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2018-02-06 00:00:00", "start": "2018-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-WKO-2019.json b/test/fixtures/NZ-WKO-2019.json index 6657dcafa..bfffe078d 100644 --- a/test/fixtures/NZ-WKO-2019.json +++ b/test/fixtures/NZ-WKO-2019.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Wed" }, + { + "date": "2019-01-28 00:00:00", + "start": "2019-01-27T11:00:00.000Z", + "end": "2019-01-28T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2019-02-06 00:00:00", "start": "2019-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-WKO-2020.json b/test/fixtures/NZ-WKO-2020.json index 86f9ef48a..14c03f991 100644 --- a/test/fixtures/NZ-WKO-2020.json +++ b/test/fixtures/NZ-WKO-2020.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Thu" }, + { + "date": "2020-01-27 00:00:00", + "start": "2020-01-26T11:00:00.000Z", + "end": "2020-01-27T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2020-02-06 00:00:00", "start": "2020-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-WKO-2021.json b/test/fixtures/NZ-WKO-2021.json index b6622958c..2f12beb4a 100644 --- a/test/fixtures/NZ-WKO-2021.json +++ b/test/fixtures/NZ-WKO-2021.json @@ -27,6 +27,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Mon" }, + { + "date": "2021-02-01 00:00:00", + "start": "2021-01-31T11:00:00.000Z", + "end": "2021-02-01T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2021-02-06 00:00:00", "start": "2021-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-WKO-2022.json b/test/fixtures/NZ-WKO-2022.json index 651cb1aa6..ab7ccc9b1 100644 --- a/test/fixtures/NZ-WKO-2022.json +++ b/test/fixtures/NZ-WKO-2022.json @@ -37,6 +37,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2022-01-31 00:00:00", + "start": "2022-01-30T11:00:00.000Z", + "end": "2022-01-31T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2022-02-06 00:00:00", "start": "2022-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-WKO-2023.json b/test/fixtures/NZ-WKO-2023.json index bb159b944..6bec3f021 100644 --- a/test/fixtures/NZ-WKO-2023.json +++ b/test/fixtures/NZ-WKO-2023.json @@ -27,6 +27,15 @@ "rule": "01-01 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2023-01-30 00:00:00", + "start": "2023-01-29T11:00:00.000Z", + "end": "2023-01-30T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2023-02-06 00:00:00", "start": "2023-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-WKO-2024.json b/test/fixtures/NZ-WKO-2024.json index bc12e9a14..48fcfc6aa 100644 --- a/test/fixtures/NZ-WKO-2024.json +++ b/test/fixtures/NZ-WKO-2024.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Tue" }, + { + "date": "2024-01-29 00:00:00", + "start": "2024-01-28T11:00:00.000Z", + "end": "2024-01-29T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2024-02-06 00:00:00", "start": "2024-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-WKO-2025.json b/test/fixtures/NZ-WKO-2025.json index 692ba6a76..01601fb0a 100644 --- a/test/fixtures/NZ-WKO-2025.json +++ b/test/fixtures/NZ-WKO-2025.json @@ -17,6 +17,15 @@ "rule": "01-02 and if saturday then next monday if sunday then next tuesday", "_weekday": "Thu" }, + { + "date": "2025-01-27 00:00:00", + "start": "2025-01-26T11:00:00.000Z", + "end": "2025-01-27T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "01-29 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2025-02-06 00:00:00", "start": "2025-02-05T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-S-2015.json b/test/fixtures/NZ-WTC-Buller-2015.json similarity index 92% rename from test/fixtures/NZ-CAN-S-2015.json rename to test/fixtures/NZ-WTC-Buller-2015.json index b3d12740b..5fa79fb1f 100644 --- a/test/fixtures/NZ-CAN-S-2015.json +++ b/test/fixtures/NZ-WTC-Buller-2015.json @@ -81,15 +81,6 @@ "rule": "1st monday in June", "_weekday": "Mon" }, - { - "date": "2015-09-28 00:00:00", - "start": "2015-09-27T11:00:00.000Z", - "end": "2015-09-28T11:00:00.000Z", - "name": "Dominion Day", - "type": "public", - "rule": "4th monday in September", - "_weekday": "Mon" - }, { "date": "2015-10-26 00:00:00", "start": "2015-10-25T11:00:00.000Z", @@ -99,6 +90,15 @@ "rule": "4th monday in October", "_weekday": "Mon" }, + { + "date": "2015-11-30 00:00:00", + "start": "2015-11-29T11:00:00.000Z", + "end": "2015-11-30T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "12-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2015-12-25 00:00:00", "start": "2015-12-24T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-S-2016.json b/test/fixtures/NZ-WTC-Buller-2016.json similarity index 93% rename from test/fixtures/NZ-CAN-S-2016.json rename to test/fixtures/NZ-WTC-Buller-2016.json index 3ec68d30e..03c3d7628 100644 --- a/test/fixtures/NZ-CAN-S-2016.json +++ b/test/fixtures/NZ-WTC-Buller-2016.json @@ -91,15 +91,6 @@ "rule": "1st monday in June", "_weekday": "Mon" }, - { - "date": "2016-09-26 00:00:00", - "start": "2016-09-25T11:00:00.000Z", - "end": "2016-09-26T11:00:00.000Z", - "name": "Dominion Day", - "type": "public", - "rule": "4th monday in September", - "_weekday": "Mon" - }, { "date": "2016-10-24 00:00:00", "start": "2016-10-23T11:00:00.000Z", @@ -109,6 +100,15 @@ "rule": "4th monday in October", "_weekday": "Mon" }, + { + "date": "2016-11-28 00:00:00", + "start": "2016-11-27T11:00:00.000Z", + "end": "2016-11-28T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "12-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2016-12-25 00:00:00", "start": "2016-12-24T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-S-2017.json b/test/fixtures/NZ-WTC-Buller-2017.json similarity index 92% rename from test/fixtures/NZ-CAN-S-2017.json rename to test/fixtures/NZ-WTC-Buller-2017.json index 8147b6d3e..055146001 100644 --- a/test/fixtures/NZ-CAN-S-2017.json +++ b/test/fixtures/NZ-WTC-Buller-2017.json @@ -81,15 +81,6 @@ "rule": "1st monday in June", "_weekday": "Mon" }, - { - "date": "2017-09-25 00:00:00", - "start": "2017-09-24T11:00:00.000Z", - "end": "2017-09-25T11:00:00.000Z", - "name": "Dominion Day", - "type": "public", - "rule": "4th monday in September", - "_weekday": "Mon" - }, { "date": "2017-10-23 00:00:00", "start": "2017-10-22T11:00:00.000Z", @@ -99,6 +90,15 @@ "rule": "4th monday in October", "_weekday": "Mon" }, + { + "date": "2017-12-04 00:00:00", + "start": "2017-12-03T11:00:00.000Z", + "end": "2017-12-04T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "12-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2017-12-25 00:00:00", "start": "2017-12-24T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-S-2018.json b/test/fixtures/NZ-WTC-Buller-2018.json similarity index 91% rename from test/fixtures/NZ-CAN-S-2018.json rename to test/fixtures/NZ-WTC-Buller-2018.json index ca7e11d3a..f05fc0a9b 100644 --- a/test/fixtures/NZ-CAN-S-2018.json +++ b/test/fixtures/NZ-WTC-Buller-2018.json @@ -71,15 +71,6 @@ "rule": "1st monday in June", "_weekday": "Mon" }, - { - "date": "2018-09-24 00:00:00", - "start": "2018-09-23T12:00:00.000Z", - "end": "2018-09-24T12:00:00.000Z", - "name": "Dominion Day", - "type": "public", - "rule": "4th monday in September", - "_weekday": "Mon" - }, { "date": "2018-10-22 00:00:00", "start": "2018-10-21T11:00:00.000Z", @@ -89,6 +80,15 @@ "rule": "4th monday in October", "_weekday": "Mon" }, + { + "date": "2018-12-03 00:00:00", + "start": "2018-12-02T11:00:00.000Z", + "end": "2018-12-03T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "12-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2018-12-25 00:00:00", "start": "2018-12-24T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-S-2019.json b/test/fixtures/NZ-WTC-Buller-2019.json similarity index 91% rename from test/fixtures/NZ-CAN-S-2019.json rename to test/fixtures/NZ-WTC-Buller-2019.json index 2f0295dbb..b40445172 100644 --- a/test/fixtures/NZ-CAN-S-2019.json +++ b/test/fixtures/NZ-WTC-Buller-2019.json @@ -71,15 +71,6 @@ "rule": "1st monday in June", "_weekday": "Mon" }, - { - "date": "2019-09-23 00:00:00", - "start": "2019-09-22T12:00:00.000Z", - "end": "2019-09-23T12:00:00.000Z", - "name": "Dominion Day", - "type": "public", - "rule": "4th monday in September", - "_weekday": "Mon" - }, { "date": "2019-10-28 00:00:00", "start": "2019-10-27T11:00:00.000Z", @@ -89,6 +80,15 @@ "rule": "4th monday in October", "_weekday": "Mon" }, + { + "date": "2019-12-02 00:00:00", + "start": "2019-12-01T11:00:00.000Z", + "end": "2019-12-02T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "12-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2019-12-25 00:00:00", "start": "2019-12-24T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-S-2020.json b/test/fixtures/NZ-WTC-Buller-2020.json similarity index 92% rename from test/fixtures/NZ-CAN-S-2020.json rename to test/fixtures/NZ-WTC-Buller-2020.json index cb13acc3a..7a9269d69 100644 --- a/test/fixtures/NZ-CAN-S-2020.json +++ b/test/fixtures/NZ-WTC-Buller-2020.json @@ -81,15 +81,6 @@ "rule": "1st monday in June", "_weekday": "Mon" }, - { - "date": "2020-09-28 00:00:00", - "start": "2020-09-27T11:00:00.000Z", - "end": "2020-09-28T11:00:00.000Z", - "name": "Dominion Day", - "type": "public", - "rule": "4th monday in September", - "_weekday": "Mon" - }, { "date": "2020-10-26 00:00:00", "start": "2020-10-25T11:00:00.000Z", @@ -99,6 +90,15 @@ "rule": "4th monday in October", "_weekday": "Mon" }, + { + "date": "2020-11-30 00:00:00", + "start": "2020-11-29T11:00:00.000Z", + "end": "2020-11-30T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "12-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2020-12-25 00:00:00", "start": "2020-12-24T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-S-2021.json b/test/fixtures/NZ-WTC-Buller-2021.json similarity index 94% rename from test/fixtures/NZ-CAN-S-2021.json rename to test/fixtures/NZ-WTC-Buller-2021.json index 8b23e259e..03e05c02f 100644 --- a/test/fixtures/NZ-CAN-S-2021.json +++ b/test/fixtures/NZ-WTC-Buller-2021.json @@ -101,15 +101,6 @@ "rule": "1st monday in June", "_weekday": "Mon" }, - { - "date": "2021-09-27 00:00:00", - "start": "2021-09-26T11:00:00.000Z", - "end": "2021-09-27T11:00:00.000Z", - "name": "Dominion Day", - "type": "public", - "rule": "4th monday in September", - "_weekday": "Mon" - }, { "date": "2021-10-25 00:00:00", "start": "2021-10-24T11:00:00.000Z", @@ -119,6 +110,15 @@ "rule": "4th monday in October", "_weekday": "Mon" }, + { + "date": "2021-11-29 00:00:00", + "start": "2021-11-28T11:00:00.000Z", + "end": "2021-11-29T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "12-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2021-12-25 00:00:00", "start": "2021-12-24T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-S-2022.json b/test/fixtures/NZ-WTC-Buller-2022.json similarity index 94% rename from test/fixtures/NZ-CAN-S-2022.json rename to test/fixtures/NZ-WTC-Buller-2022.json index a0f5567c6..ce22685ac 100644 --- a/test/fixtures/NZ-CAN-S-2022.json +++ b/test/fixtures/NZ-WTC-Buller-2022.json @@ -110,15 +110,6 @@ "rule": "2022-06-24", "_weekday": "Fri" }, - { - "date": "2022-09-26 00:00:00", - "start": "2022-09-25T11:00:00.000Z", - "end": "2022-09-26T11:00:00.000Z", - "name": "Dominion Day", - "type": "public", - "rule": "4th monday in September", - "_weekday": "Mon" - }, { "date": "2022-10-24 00:00:00", "start": "2022-10-23T11:00:00.000Z", @@ -128,6 +119,15 @@ "rule": "4th monday in October", "_weekday": "Mon" }, + { + "date": "2022-11-28 00:00:00", + "start": "2022-11-27T11:00:00.000Z", + "end": "2022-11-28T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "12-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2022-12-25 00:00:00", "start": "2022-12-24T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-S-2023.json b/test/fixtures/NZ-WTC-Buller-2023.json similarity index 92% rename from test/fixtures/NZ-CAN-S-2023.json rename to test/fixtures/NZ-WTC-Buller-2023.json index e29748954..706fcd3ec 100644 --- a/test/fixtures/NZ-CAN-S-2023.json +++ b/test/fixtures/NZ-WTC-Buller-2023.json @@ -90,15 +90,6 @@ "rule": "2023-07-14", "_weekday": "Fri" }, - { - "date": "2023-09-25 00:00:00", - "start": "2023-09-24T11:00:00.000Z", - "end": "2023-09-25T11:00:00.000Z", - "name": "Dominion Day", - "type": "public", - "rule": "4th monday in September", - "_weekday": "Mon" - }, { "date": "2023-10-23 00:00:00", "start": "2023-10-22T11:00:00.000Z", @@ -108,6 +99,15 @@ "rule": "4th monday in October", "_weekday": "Mon" }, + { + "date": "2023-12-04 00:00:00", + "start": "2023-12-03T11:00:00.000Z", + "end": "2023-12-04T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "12-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2023-12-25 00:00:00", "start": "2023-12-24T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-S-2024.json b/test/fixtures/NZ-WTC-Buller-2024.json similarity index 91% rename from test/fixtures/NZ-CAN-S-2024.json rename to test/fixtures/NZ-WTC-Buller-2024.json index 4ab334eeb..8078ea54a 100644 --- a/test/fixtures/NZ-CAN-S-2024.json +++ b/test/fixtures/NZ-WTC-Buller-2024.json @@ -80,15 +80,6 @@ "rule": "2024-06-28", "_weekday": "Fri" }, - { - "date": "2024-09-23 00:00:00", - "start": "2024-09-22T12:00:00.000Z", - "end": "2024-09-23T12:00:00.000Z", - "name": "Dominion Day", - "type": "public", - "rule": "4th monday in September", - "_weekday": "Mon" - }, { "date": "2024-10-28 00:00:00", "start": "2024-10-27T11:00:00.000Z", @@ -98,6 +89,15 @@ "rule": "4th monday in October", "_weekday": "Mon" }, + { + "date": "2024-12-02 00:00:00", + "start": "2024-12-01T11:00:00.000Z", + "end": "2024-12-02T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "12-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2024-12-25 00:00:00", "start": "2024-12-24T11:00:00.000Z", diff --git a/test/fixtures/NZ-CAN-S-2025.json b/test/fixtures/NZ-WTC-Buller-2025.json similarity index 91% rename from test/fixtures/NZ-CAN-S-2025.json rename to test/fixtures/NZ-WTC-Buller-2025.json index 71d7d86d1..6a296357f 100644 --- a/test/fixtures/NZ-CAN-S-2025.json +++ b/test/fixtures/NZ-WTC-Buller-2025.json @@ -80,15 +80,6 @@ "rule": "2025-06-20", "_weekday": "Fri" }, - { - "date": "2025-09-22 00:00:00", - "start": "2025-09-21T12:00:00.000Z", - "end": "2025-09-22T12:00:00.000Z", - "name": "Dominion Day", - "type": "public", - "rule": "4th monday in September", - "_weekday": "Mon" - }, { "date": "2025-10-27 00:00:00", "start": "2025-10-26T11:00:00.000Z", @@ -98,6 +89,15 @@ "rule": "4th monday in October", "_weekday": "Mon" }, + { + "date": "2025-12-01 00:00:00", + "start": "2025-11-30T11:00:00.000Z", + "end": "2025-12-01T11:00:00.000Z", + "name": "Provincial anniversary day", + "type": "public", + "rule": "12-01 if tuesday,wednesday,thursday then previous monday if friday,saturday,sunday then next monday", + "_weekday": "Mon" + }, { "date": "2025-12-25 00:00:00", "start": "2025-12-24T11:00:00.000Z",