diff --git a/README.md b/README.md index cb0e34d76..3ccca87c9 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ Countries: 195 │ └── 9: Wien ├── AU: Australia │ ├── ACT: Australian Capital Territory +│ │ └── NF: Norfolk Island │ ├── NSW: New South Wales │ ├── NT: Northern Territory │ ├── QLD: Queensland diff --git a/data/countries/AU.yaml b/data/countries/AU.yaml index 1955113a3..70b02bb83 100644 --- a/data/countries/AU.yaml +++ b/data/countries/AU.yaml @@ -8,6 +8,7 @@ holidays: langs: - en zones: + - Pacific/Norfolk - Australia/Sydney - Australia/Lord_Howe - Antarctica/Macquarie @@ -79,7 +80,51 @@ holidays: 1st monday in October: name: en: Labour Day - # @source https://www.legislation.nsw.gov.au/~/pdf/view/act/2010/115/whole + # @source https://www.legislation.nsw.gov.au/~/pdf/view/act/2010/115/whole + regions: + # @source https://www.legislation.gov.au/Details/C2021Q00011 Section 9 + NF: + name: Norfolk Island + zones: + - Pacific/Norfolk + days: + 2nd monday in March: false + 03-06 and if saturday,sunday then next monday: + name: + en: Foundation Day + type: public + easter: false + 04-25 if sunday then next monday: false + "2020-04-27": false + 04-25: + name: + en: Anzac Day + easter -1: false + monday after 05-27: false + 06-08 if saturday,sunday then next monday: + substitute: true + name: + en: Anniversary (Bounty) Day + type: public + 2nd monday in June: false + monday after 2nd saturday in June if is public holiday then next monday: + substitute: true + name: + en: Queen's Birthday + 1st monday in October: false + 2nd monday in October: + name: + en: Norfolk Island Agricultural Show + type: public + Wednesday before 12-01: + name: + en: Thanksgiving Day + type: public + # @source http://www.norfolkisland.gov.nf/sites/default/files/docs/NIRC/Gazettes/2017/2017_09_29%20Gazette%20No.%2099.pdf 2018 + # @source http://www.norfolkisland.gov.nf/sites/default/files/docs/NIRC/Gazettes/2018_06_29%20Gazette%20No.%2026.pdf 2019 + # @source http://www.norfolkisland.gov.nf/sites/default/files/docs/NIRC/Gazettes/2019_07_05%20Gazette%20No.%2030.pdf 2020 + # @source http://www.norfolkislander.com/images/2020_07_31_Gazette_No._35.pdf 2021 + # @source http://www.norfolkisland.gov.nf/sites/default/files/docs/NIRC/Gazettes/2021_07_09%20Gazette%20No.%2029.pdf 2022 NSW: name: New South Wales zones: diff --git a/data/countries/NF.todo b/data/countries/NF.todo index 00d1884e7..28fea8a08 100644 --- a/data/countries/NF.todo +++ b/data/countries/NF.todo @@ -1,9 +1 @@ -holidays: - NF: - names: - en: Norfolk Island - langs: [] - zones: - - Pacific/Norfolk - dayoff: '' - days: {} +# @see "au.act.nf" \ No newline at end of file diff --git a/package.json b/package.json index 86431c4b4..f5f31a9a2 100644 --- a/package.json +++ b/package.json @@ -179,7 +179,7 @@ "reporter": "dot" }, "dependencies": { - "date-holidays-parser": "^3.2.4", + "date-holidays-parser": "^3.3.0-0", "js-yaml": "^4.1.0", "lodash.omit": "^4.5.0", "lodash.pick": "^4.4.0", diff --git a/test/fixtures/AU-2019.json b/test/fixtures/AU-2019.json index f1279842c..af603d039 100644 --- a/test/fixtures/AU-2019.json +++ b/test/fixtures/AU-2019.json @@ -19,8 +19,8 @@ }, { "date": "2019-04-19 00:00:00", - "start": "2019-04-18T14:00:00.000Z", - "end": "2019-04-19T14:00:00.000Z", + "start": "2019-04-18T13:00:00.000Z", + "end": "2019-04-19T13:00:00.000Z", "name": "Good Friday", "type": "public", "rule": "easter -2", @@ -28,8 +28,8 @@ }, { "date": "2019-04-20 00:00:00", - "start": "2019-04-19T14:00:00.000Z", - "end": "2019-04-20T14:00:00.000Z", + "start": "2019-04-19T13:00:00.000Z", + "end": "2019-04-20T13:00:00.000Z", "name": "Easter Saturday", "type": "public", "rule": "easter -1", @@ -37,8 +37,8 @@ }, { "date": "2019-04-21 00:00:00", - "start": "2019-04-20T14:00:00.000Z", - "end": "2019-04-21T14:00:00.000Z", + "start": "2019-04-20T13:00:00.000Z", + "end": "2019-04-21T13:00:00.000Z", "name": "Easter Sunday", "type": "public", "rule": "easter", @@ -46,8 +46,8 @@ }, { "date": "2019-04-22 00:00:00", - "start": "2019-04-21T14:00:00.000Z", - "end": "2019-04-22T14:00:00.000Z", + "start": "2019-04-21T13:00:00.000Z", + "end": "2019-04-22T13:00:00.000Z", "name": "Easter Monday", "type": "public", "rule": "easter 1", @@ -55,8 +55,8 @@ }, { "date": "2019-04-25 00:00:00", - "start": "2019-04-24T14:00:00.000Z", - "end": "2019-04-25T14:00:00.000Z", + "start": "2019-04-24T13:00:00.000Z", + "end": "2019-04-25T13:00:00.000Z", "name": "Anzac Day", "type": "public", "rule": "04-25", @@ -64,8 +64,8 @@ }, { "date": "2019-05-12 00:00:00", - "start": "2019-05-11T14:00:00.000Z", - "end": "2019-05-12T14:00:00.000Z", + "start": "2019-05-11T13:00:00.000Z", + "end": "2019-05-12T13:00:00.000Z", "name": "Mother's Day", "type": "observance", "rule": "2nd sunday in May", @@ -73,8 +73,8 @@ }, { "date": "2019-09-01 00:00:00", - "start": "2019-08-31T14:00:00.000Z", - "end": "2019-09-01T14:00:00.000Z", + "start": "2019-08-31T13:00:00.000Z", + "end": "2019-09-01T13:00:00.000Z", "name": "Father's Day", "type": "observance", "rule": "1st sunday in September", @@ -82,8 +82,8 @@ }, { "date": "2019-12-25 00:00:00", - "start": "2019-12-24T13:00:00.000Z", - "end": "2019-12-25T13:00:00.000Z", + "start": "2019-12-24T12:00:00.000Z", + "end": "2019-12-25T12:00:00.000Z", "name": "Christmas Day", "type": "public", "rule": "12-25 and if saturday then next monday if sunday then next tuesday", @@ -91,8 +91,8 @@ }, { "date": "2019-12-26 00:00:00", - "start": "2019-12-25T13:00:00.000Z", - "end": "2019-12-26T13:00:00.000Z", + "start": "2019-12-25T12:00:00.000Z", + "end": "2019-12-26T12:00:00.000Z", "name": "Boxing Day", "type": "public", "rule": "12-26 and if saturday then next monday if sunday then next tuesday", diff --git a/test/fixtures/AU-2020.json b/test/fixtures/AU-2020.json index 30061fd83..e88b33f48 100644 --- a/test/fixtures/AU-2020.json +++ b/test/fixtures/AU-2020.json @@ -1,8 +1,8 @@ [ { "date": "2020-01-01 00:00:00", - "start": "2019-12-31T13:00:00.000Z", - "end": "2020-01-01T13:00:00.000Z", + "start": "2019-12-31T12:00:00.000Z", + "end": "2020-01-01T12:00:00.000Z", "name": "New Year's Day", "type": "public", "rule": "01-01 and if saturday,sunday then next monday", @@ -10,8 +10,8 @@ }, { "date": "2020-01-27 00:00:00", - "start": "2020-01-26T13:00:00.000Z", - "end": "2020-01-27T13:00:00.000Z", + "start": "2020-01-26T12:00:00.000Z", + "end": "2020-01-27T12:00:00.000Z", "name": "Australia Day", "type": "public", "rule": "01-26 if saturday,sunday then next monday", @@ -19,8 +19,8 @@ }, { "date": "2020-04-10 00:00:00", - "start": "2020-04-09T14:00:00.000Z", - "end": "2020-04-10T14:00:00.000Z", + "start": "2020-04-09T13:00:00.000Z", + "end": "2020-04-10T13:00:00.000Z", "name": "Good Friday", "type": "public", "rule": "easter -2", @@ -28,8 +28,8 @@ }, { "date": "2020-04-11 00:00:00", - "start": "2020-04-10T14:00:00.000Z", - "end": "2020-04-11T14:00:00.000Z", + "start": "2020-04-10T13:00:00.000Z", + "end": "2020-04-11T13:00:00.000Z", "name": "Easter Saturday", "type": "public", "rule": "easter -1", @@ -37,8 +37,8 @@ }, { "date": "2020-04-12 00:00:00", - "start": "2020-04-11T14:00:00.000Z", - "end": "2020-04-12T14:00:00.000Z", + "start": "2020-04-11T13:00:00.000Z", + "end": "2020-04-12T13:00:00.000Z", "name": "Easter Sunday", "type": "public", "rule": "easter", @@ -46,8 +46,8 @@ }, { "date": "2020-04-13 00:00:00", - "start": "2020-04-12T14:00:00.000Z", - "end": "2020-04-13T14:00:00.000Z", + "start": "2020-04-12T13:00:00.000Z", + "end": "2020-04-13T13:00:00.000Z", "name": "Easter Monday", "type": "public", "rule": "easter 1", @@ -55,8 +55,8 @@ }, { "date": "2020-04-25 00:00:00", - "start": "2020-04-24T14:00:00.000Z", - "end": "2020-04-25T14:00:00.000Z", + "start": "2020-04-24T13:00:00.000Z", + "end": "2020-04-25T13:00:00.000Z", "name": "Anzac Day", "type": "public", "rule": "04-25", @@ -64,8 +64,8 @@ }, { "date": "2020-05-10 00:00:00", - "start": "2020-05-09T14:00:00.000Z", - "end": "2020-05-10T14:00:00.000Z", + "start": "2020-05-09T13:00:00.000Z", + "end": "2020-05-10T13:00:00.000Z", "name": "Mother's Day", "type": "observance", "rule": "2nd sunday in May", @@ -73,8 +73,8 @@ }, { "date": "2020-09-06 00:00:00", - "start": "2020-09-05T14:00:00.000Z", - "end": "2020-09-06T14:00:00.000Z", + "start": "2020-09-05T13:00:00.000Z", + "end": "2020-09-06T13:00:00.000Z", "name": "Father's Day", "type": "observance", "rule": "1st sunday in September", @@ -82,8 +82,8 @@ }, { "date": "2020-12-25 00:00:00", - "start": "2020-12-24T13:00:00.000Z", - "end": "2020-12-25T13:00:00.000Z", + "start": "2020-12-24T12:00:00.000Z", + "end": "2020-12-25T12:00:00.000Z", "name": "Christmas Day", "type": "public", "rule": "12-25 and if saturday then next monday if sunday then next tuesday", @@ -91,8 +91,8 @@ }, { "date": "2020-12-26 00:00:00", - "start": "2020-12-25T13:00:00.000Z", - "end": "2020-12-26T13:00:00.000Z", + "start": "2020-12-25T12:00:00.000Z", + "end": "2020-12-26T12:00:00.000Z", "name": "Boxing Day", "type": "public", "rule": "12-26 and if saturday then next monday if sunday then next tuesday", @@ -100,8 +100,8 @@ }, { "date": "2020-12-28 00:00:00", - "start": "2020-12-27T13:00:00.000Z", - "end": "2020-12-28T13:00:00.000Z", + "start": "2020-12-27T12:00:00.000Z", + "end": "2020-12-28T12:00:00.000Z", "name": "Boxing Day (substitute day)", "type": "public", "substitute": true, diff --git a/test/fixtures/AU-2021.json b/test/fixtures/AU-2021.json index 06c63864b..fd94c89e1 100644 --- a/test/fixtures/AU-2021.json +++ b/test/fixtures/AU-2021.json @@ -1,8 +1,8 @@ [ { "date": "2021-01-01 00:00:00", - "start": "2020-12-31T13:00:00.000Z", - "end": "2021-01-01T13:00:00.000Z", + "start": "2020-12-31T12:00:00.000Z", + "end": "2021-01-01T12:00:00.000Z", "name": "New Year's Day", "type": "public", "rule": "01-01 and if saturday,sunday then next monday", @@ -10,8 +10,8 @@ }, { "date": "2021-01-26 00:00:00", - "start": "2021-01-25T13:00:00.000Z", - "end": "2021-01-26T13:00:00.000Z", + "start": "2021-01-25T12:00:00.000Z", + "end": "2021-01-26T12:00:00.000Z", "name": "Australia Day", "type": "public", "rule": "01-26 if saturday,sunday then next monday", @@ -19,8 +19,8 @@ }, { "date": "2021-04-02 00:00:00", - "start": "2021-04-01T13:00:00.000Z", - "end": "2021-04-02T13:00:00.000Z", + "start": "2021-04-01T12:00:00.000Z", + "end": "2021-04-02T12:00:00.000Z", "name": "Good Friday", "type": "public", "rule": "easter -2", @@ -28,8 +28,8 @@ }, { "date": "2021-04-03 00:00:00", - "start": "2021-04-02T13:00:00.000Z", - "end": "2021-04-03T13:00:00.000Z", + "start": "2021-04-02T12:00:00.000Z", + "end": "2021-04-03T12:00:00.000Z", "name": "Easter Saturday", "type": "public", "rule": "easter -1", @@ -37,8 +37,8 @@ }, { "date": "2021-04-04 00:00:00", - "start": "2021-04-03T13:00:00.000Z", - "end": "2021-04-04T14:00:00.000Z", + "start": "2021-04-03T12:00:00.000Z", + "end": "2021-04-04T13:00:00.000Z", "name": "Easter Sunday", "type": "public", "rule": "easter", @@ -46,8 +46,8 @@ }, { "date": "2021-04-05 00:00:00", - "start": "2021-04-04T14:00:00.000Z", - "end": "2021-04-05T14:00:00.000Z", + "start": "2021-04-04T13:00:00.000Z", + "end": "2021-04-05T13:00:00.000Z", "name": "Easter Monday", "type": "public", "rule": "easter 1", @@ -55,8 +55,8 @@ }, { "date": "2021-04-25 00:00:00", - "start": "2021-04-24T14:00:00.000Z", - "end": "2021-04-25T14:00:00.000Z", + "start": "2021-04-24T13:00:00.000Z", + "end": "2021-04-25T13:00:00.000Z", "name": "Anzac Day", "type": "public", "rule": "04-25", @@ -64,8 +64,8 @@ }, { "date": "2021-05-09 00:00:00", - "start": "2021-05-08T14:00:00.000Z", - "end": "2021-05-09T14:00:00.000Z", + "start": "2021-05-08T13:00:00.000Z", + "end": "2021-05-09T13:00:00.000Z", "name": "Mother's Day", "type": "observance", "rule": "2nd sunday in May", @@ -73,8 +73,8 @@ }, { "date": "2021-09-05 00:00:00", - "start": "2021-09-04T14:00:00.000Z", - "end": "2021-09-05T14:00:00.000Z", + "start": "2021-09-04T13:00:00.000Z", + "end": "2021-09-05T13:00:00.000Z", "name": "Father's Day", "type": "observance", "rule": "1st sunday in September", @@ -82,8 +82,8 @@ }, { "date": "2021-12-25 00:00:00", - "start": "2021-12-24T13:00:00.000Z", - "end": "2021-12-25T13:00:00.000Z", + "start": "2021-12-24T12:00:00.000Z", + "end": "2021-12-25T12:00:00.000Z", "name": "Christmas Day", "type": "public", "rule": "12-25 and if saturday then next monday if sunday then next tuesday", @@ -91,8 +91,8 @@ }, { "date": "2021-12-26 00:00:00", - "start": "2021-12-25T13:00:00.000Z", - "end": "2021-12-26T13:00:00.000Z", + "start": "2021-12-25T12:00:00.000Z", + "end": "2021-12-26T12:00:00.000Z", "name": "Boxing Day", "type": "public", "rule": "12-26 and if saturday then next monday if sunday then next tuesday", @@ -100,8 +100,8 @@ }, { "date": "2021-12-27 00:00:00", - "start": "2021-12-26T13:00:00.000Z", - "end": "2021-12-27T13:00:00.000Z", + "start": "2021-12-26T12:00:00.000Z", + "end": "2021-12-27T12:00:00.000Z", "name": "Christmas Day (substitute day)", "type": "public", "substitute": true, @@ -110,8 +110,8 @@ }, { "date": "2021-12-28 00:00:00", - "start": "2021-12-27T13:00:00.000Z", - "end": "2021-12-28T13:00:00.000Z", + "start": "2021-12-27T12:00:00.000Z", + "end": "2021-12-28T12:00:00.000Z", "name": "Boxing Day (substitute day)", "type": "public", "substitute": true, diff --git a/test/fixtures/AU-2022.json b/test/fixtures/AU-2022.json index 45c728cec..653027958 100644 --- a/test/fixtures/AU-2022.json +++ b/test/fixtures/AU-2022.json @@ -1,8 +1,8 @@ [ { "date": "2022-01-01 00:00:00", - "start": "2021-12-31T13:00:00.000Z", - "end": "2022-01-01T13:00:00.000Z", + "start": "2021-12-31T12:00:00.000Z", + "end": "2022-01-01T12:00:00.000Z", "name": "New Year's Day", "type": "public", "rule": "01-01 and if saturday,sunday then next monday", @@ -10,8 +10,8 @@ }, { "date": "2022-01-03 00:00:00", - "start": "2022-01-02T13:00:00.000Z", - "end": "2022-01-03T13:00:00.000Z", + "start": "2022-01-02T12:00:00.000Z", + "end": "2022-01-03T12:00:00.000Z", "name": "New Year's Day", "type": "public", "rule": "01-01 and if saturday,sunday then next monday", @@ -19,8 +19,8 @@ }, { "date": "2022-01-26 00:00:00", - "start": "2022-01-25T13:00:00.000Z", - "end": "2022-01-26T13:00:00.000Z", + "start": "2022-01-25T12:00:00.000Z", + "end": "2022-01-26T12:00:00.000Z", "name": "Australia Day", "type": "public", "rule": "01-26 if saturday,sunday then next monday", @@ -28,8 +28,8 @@ }, { "date": "2022-04-15 00:00:00", - "start": "2022-04-14T14:00:00.000Z", - "end": "2022-04-15T14:00:00.000Z", + "start": "2022-04-14T13:00:00.000Z", + "end": "2022-04-15T13:00:00.000Z", "name": "Good Friday", "type": "public", "rule": "easter -2", @@ -37,8 +37,8 @@ }, { "date": "2022-04-16 00:00:00", - "start": "2022-04-15T14:00:00.000Z", - "end": "2022-04-16T14:00:00.000Z", + "start": "2022-04-15T13:00:00.000Z", + "end": "2022-04-16T13:00:00.000Z", "name": "Easter Saturday", "type": "public", "rule": "easter -1", @@ -46,8 +46,8 @@ }, { "date": "2022-04-17 00:00:00", - "start": "2022-04-16T14:00:00.000Z", - "end": "2022-04-17T14:00:00.000Z", + "start": "2022-04-16T13:00:00.000Z", + "end": "2022-04-17T13:00:00.000Z", "name": "Easter Sunday", "type": "public", "rule": "easter", @@ -55,8 +55,8 @@ }, { "date": "2022-04-18 00:00:00", - "start": "2022-04-17T14:00:00.000Z", - "end": "2022-04-18T14:00:00.000Z", + "start": "2022-04-17T13:00:00.000Z", + "end": "2022-04-18T13:00:00.000Z", "name": "Easter Monday", "type": "public", "rule": "easter 1", @@ -64,8 +64,8 @@ }, { "date": "2022-04-25 00:00:00", - "start": "2022-04-24T14:00:00.000Z", - "end": "2022-04-25T14:00:00.000Z", + "start": "2022-04-24T13:00:00.000Z", + "end": "2022-04-25T13:00:00.000Z", "name": "Anzac Day", "type": "public", "rule": "04-25", @@ -73,8 +73,8 @@ }, { "date": "2022-05-08 00:00:00", - "start": "2022-05-07T14:00:00.000Z", - "end": "2022-05-08T14:00:00.000Z", + "start": "2022-05-07T13:00:00.000Z", + "end": "2022-05-08T13:00:00.000Z", "name": "Mother's Day", "type": "observance", "rule": "2nd sunday in May", @@ -82,8 +82,8 @@ }, { "date": "2022-09-04 00:00:00", - "start": "2022-09-03T14:00:00.000Z", - "end": "2022-09-04T14:00:00.000Z", + "start": "2022-09-03T13:00:00.000Z", + "end": "2022-09-04T13:00:00.000Z", "name": "Father's Day", "type": "observance", "rule": "1st sunday in September", @@ -91,8 +91,8 @@ }, { "date": "2022-12-25 00:00:00", - "start": "2022-12-24T13:00:00.000Z", - "end": "2022-12-25T13:00:00.000Z", + "start": "2022-12-24T12:00:00.000Z", + "end": "2022-12-25T12:00:00.000Z", "name": "Christmas Day", "type": "public", "rule": "12-25 and if saturday then next monday if sunday then next tuesday", @@ -100,8 +100,8 @@ }, { "date": "2022-12-26 00:00:00", - "start": "2022-12-25T13:00:00.000Z", - "end": "2022-12-26T13:00:00.000Z", + "start": "2022-12-25T12:00:00.000Z", + "end": "2022-12-26T12:00:00.000Z", "name": "Boxing Day", "type": "public", "rule": "12-26 and if saturday then next monday if sunday then next tuesday", @@ -109,8 +109,8 @@ }, { "date": "2022-12-27 00:00:00", - "start": "2022-12-26T13:00:00.000Z", - "end": "2022-12-27T13:00:00.000Z", + "start": "2022-12-26T12:00:00.000Z", + "end": "2022-12-27T12:00:00.000Z", "name": "Christmas Day (substitute day)", "type": "public", "substitute": true, diff --git a/test/fixtures/AU-2023.json b/test/fixtures/AU-2023.json index f643033a8..90c4f4dfd 100644 --- a/test/fixtures/AU-2023.json +++ b/test/fixtures/AU-2023.json @@ -1,8 +1,8 @@ [ { "date": "2023-01-01 00:00:00", - "start": "2022-12-31T13:00:00.000Z", - "end": "2023-01-01T13:00:00.000Z", + "start": "2022-12-31T12:00:00.000Z", + "end": "2023-01-01T12:00:00.000Z", "name": "New Year's Day", "type": "public", "rule": "01-01 and if saturday,sunday then next monday", @@ -10,8 +10,8 @@ }, { "date": "2023-01-02 00:00:00", - "start": "2023-01-01T13:00:00.000Z", - "end": "2023-01-02T13:00:00.000Z", + "start": "2023-01-01T12:00:00.000Z", + "end": "2023-01-02T12:00:00.000Z", "name": "New Year's Day", "type": "public", "rule": "01-01 and if saturday,sunday then next monday", @@ -19,8 +19,8 @@ }, { "date": "2023-01-26 00:00:00", - "start": "2023-01-25T13:00:00.000Z", - "end": "2023-01-26T13:00:00.000Z", + "start": "2023-01-25T12:00:00.000Z", + "end": "2023-01-26T12:00:00.000Z", "name": "Australia Day", "type": "public", "rule": "01-26 if saturday,sunday then next monday", @@ -28,8 +28,8 @@ }, { "date": "2023-04-07 00:00:00", - "start": "2023-04-06T14:00:00.000Z", - "end": "2023-04-07T14:00:00.000Z", + "start": "2023-04-06T13:00:00.000Z", + "end": "2023-04-07T13:00:00.000Z", "name": "Good Friday", "type": "public", "rule": "easter -2", @@ -37,8 +37,8 @@ }, { "date": "2023-04-08 00:00:00", - "start": "2023-04-07T14:00:00.000Z", - "end": "2023-04-08T14:00:00.000Z", + "start": "2023-04-07T13:00:00.000Z", + "end": "2023-04-08T13:00:00.000Z", "name": "Easter Saturday", "type": "public", "rule": "easter -1", @@ -46,8 +46,8 @@ }, { "date": "2023-04-09 00:00:00", - "start": "2023-04-08T14:00:00.000Z", - "end": "2023-04-09T14:00:00.000Z", + "start": "2023-04-08T13:00:00.000Z", + "end": "2023-04-09T13:00:00.000Z", "name": "Easter Sunday", "type": "public", "rule": "easter", @@ -55,8 +55,8 @@ }, { "date": "2023-04-10 00:00:00", - "start": "2023-04-09T14:00:00.000Z", - "end": "2023-04-10T14:00:00.000Z", + "start": "2023-04-09T13:00:00.000Z", + "end": "2023-04-10T13:00:00.000Z", "name": "Easter Monday", "type": "public", "rule": "easter 1", @@ -64,8 +64,8 @@ }, { "date": "2023-04-25 00:00:00", - "start": "2023-04-24T14:00:00.000Z", - "end": "2023-04-25T14:00:00.000Z", + "start": "2023-04-24T13:00:00.000Z", + "end": "2023-04-25T13:00:00.000Z", "name": "Anzac Day", "type": "public", "rule": "04-25", @@ -73,8 +73,8 @@ }, { "date": "2023-05-14 00:00:00", - "start": "2023-05-13T14:00:00.000Z", - "end": "2023-05-14T14:00:00.000Z", + "start": "2023-05-13T13:00:00.000Z", + "end": "2023-05-14T13:00:00.000Z", "name": "Mother's Day", "type": "observance", "rule": "2nd sunday in May", @@ -82,8 +82,8 @@ }, { "date": "2023-09-03 00:00:00", - "start": "2023-09-02T14:00:00.000Z", - "end": "2023-09-03T14:00:00.000Z", + "start": "2023-09-02T13:00:00.000Z", + "end": "2023-09-03T13:00:00.000Z", "name": "Father's Day", "type": "observance", "rule": "1st sunday in September", @@ -91,8 +91,8 @@ }, { "date": "2023-12-25 00:00:00", - "start": "2023-12-24T13:00:00.000Z", - "end": "2023-12-25T13:00:00.000Z", + "start": "2023-12-24T12:00:00.000Z", + "end": "2023-12-25T12:00:00.000Z", "name": "Christmas Day", "type": "public", "rule": "12-25 and if saturday then next monday if sunday then next tuesday", @@ -100,8 +100,8 @@ }, { "date": "2023-12-26 00:00:00", - "start": "2023-12-25T13:00:00.000Z", - "end": "2023-12-26T13:00:00.000Z", + "start": "2023-12-25T12:00:00.000Z", + "end": "2023-12-26T12:00:00.000Z", "name": "Boxing Day", "type": "public", "rule": "12-26 and if saturday then next monday if sunday then next tuesday", diff --git a/test/fixtures/AU-2024.json b/test/fixtures/AU-2024.json index 80a4e3b06..4b539a12e 100644 --- a/test/fixtures/AU-2024.json +++ b/test/fixtures/AU-2024.json @@ -55,8 +55,8 @@ }, { "date": "2024-04-25 00:00:00", - "start": "2024-04-24T14:00:00.000Z", - "end": "2024-04-25T14:00:00.000Z", + "start": "2024-04-24T13:00:00.000Z", + "end": "2024-04-25T13:00:00.000Z", "name": "Anzac Day", "type": "public", "rule": "04-25", @@ -64,8 +64,8 @@ }, { "date": "2024-05-12 00:00:00", - "start": "2024-05-11T14:00:00.000Z", - "end": "2024-05-12T14:00:00.000Z", + "start": "2024-05-11T13:00:00.000Z", + "end": "2024-05-12T13:00:00.000Z", "name": "Mother's Day", "type": "observance", "rule": "2nd sunday in May", @@ -73,8 +73,8 @@ }, { "date": "2024-09-01 00:00:00", - "start": "2024-08-31T14:00:00.000Z", - "end": "2024-09-01T14:00:00.000Z", + "start": "2024-08-31T13:00:00.000Z", + "end": "2024-09-01T13:00:00.000Z", "name": "Father's Day", "type": "observance", "rule": "1st sunday in September", diff --git a/test/fixtures/AU-2025.json b/test/fixtures/AU-2025.json index 1e00b6289..21b0caa0e 100644 --- a/test/fixtures/AU-2025.json +++ b/test/fixtures/AU-2025.json @@ -19,8 +19,8 @@ }, { "date": "2025-04-18 00:00:00", - "start": "2025-04-17T14:00:00.000Z", - "end": "2025-04-18T14:00:00.000Z", + "start": "2025-04-17T13:00:00.000Z", + "end": "2025-04-18T13:00:00.000Z", "name": "Good Friday", "type": "public", "rule": "easter -2", @@ -28,8 +28,8 @@ }, { "date": "2025-04-19 00:00:00", - "start": "2025-04-18T14:00:00.000Z", - "end": "2025-04-19T14:00:00.000Z", + "start": "2025-04-18T13:00:00.000Z", + "end": "2025-04-19T13:00:00.000Z", "name": "Easter Saturday", "type": "public", "rule": "easter -1", @@ -37,8 +37,8 @@ }, { "date": "2025-04-20 00:00:00", - "start": "2025-04-19T14:00:00.000Z", - "end": "2025-04-20T14:00:00.000Z", + "start": "2025-04-19T13:00:00.000Z", + "end": "2025-04-20T13:00:00.000Z", "name": "Easter Sunday", "type": "public", "rule": "easter", @@ -46,8 +46,8 @@ }, { "date": "2025-04-21 00:00:00", - "start": "2025-04-20T14:00:00.000Z", - "end": "2025-04-21T14:00:00.000Z", + "start": "2025-04-20T13:00:00.000Z", + "end": "2025-04-21T13:00:00.000Z", "name": "Easter Monday", "type": "public", "rule": "easter 1", @@ -55,8 +55,8 @@ }, { "date": "2025-04-25 00:00:00", - "start": "2025-04-24T14:00:00.000Z", - "end": "2025-04-25T14:00:00.000Z", + "start": "2025-04-24T13:00:00.000Z", + "end": "2025-04-25T13:00:00.000Z", "name": "Anzac Day", "type": "public", "rule": "04-25", @@ -64,8 +64,8 @@ }, { "date": "2025-05-11 00:00:00", - "start": "2025-05-10T14:00:00.000Z", - "end": "2025-05-11T14:00:00.000Z", + "start": "2025-05-10T13:00:00.000Z", + "end": "2025-05-11T13:00:00.000Z", "name": "Mother's Day", "type": "observance", "rule": "2nd sunday in May", @@ -73,8 +73,8 @@ }, { "date": "2025-09-07 00:00:00", - "start": "2025-09-06T14:00:00.000Z", - "end": "2025-09-07T14:00:00.000Z", + "start": "2025-09-06T13:00:00.000Z", + "end": "2025-09-07T13:00:00.000Z", "name": "Father's Day", "type": "observance", "rule": "1st sunday in September", diff --git a/test/fixtures/AU-ACT-NF-2019.json b/test/fixtures/AU-ACT-NF-2019.json new file mode 100644 index 000000000..620793f7e --- /dev/null +++ b/test/fixtures/AU-ACT-NF-2019.json @@ -0,0 +1,128 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T13:00:00.000Z", + "end": "2019-01-01T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2019-01-28 00:00:00", + "start": "2019-01-27T13:00:00.000Z", + "end": "2019-01-28T13:00:00.000Z", + "name": "Australia Day", + "type": "public", + "rule": "01-26 if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-03-06 00:00:00", + "start": "2019-03-05T13:00:00.000Z", + "end": "2019-03-06T13:00:00.000Z", + "name": "Foundation Day", + "type": "public", + "rule": "03-06 and if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T14:00:00.000Z", + "end": "2019-04-19T14:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-22 00:00:00", + "start": "2019-04-21T14:00:00.000Z", + "end": "2019-04-22T14:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2019-04-25 00:00:00", + "start": "2019-04-24T14:00:00.000Z", + "end": "2019-04-25T14:00:00.000Z", + "name": "Anzac Day", + "type": "public", + "rule": "04-25", + "_weekday": "Thu" + }, + { + "date": "2019-05-12 00:00:00", + "start": "2019-05-11T14:00:00.000Z", + "end": "2019-05-12T14:00:00.000Z", + "name": "Mother's Day", + "type": "observance", + "rule": "2nd sunday in May", + "_weekday": "Sun" + }, + { + "date": "2019-06-10 00:00:00", + "start": "2019-06-09T14:00:00.000Z", + "end": "2019-06-10T14:00:00.000Z", + "name": "Anniversary (Bounty) Day", + "type": "public", + "rule": "06-08 if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-06-17 00:00:00", + "start": "2019-06-16T14:00:00.000Z", + "end": "2019-06-17T14:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "monday after 2nd saturday in June if is public holiday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-09-01 00:00:00", + "start": "2019-08-31T14:00:00.000Z", + "end": "2019-09-01T14:00:00.000Z", + "name": "Father's Day", + "type": "observance", + "rule": "1st sunday in September", + "_weekday": "Sun" + }, + { + "date": "2019-10-14 00:00:00", + "start": "2019-10-13T13:00:00.000Z", + "end": "2019-10-14T13:00:00.000Z", + "name": "Norfolk Island Agricultural Show", + "type": "public", + "rule": "2nd monday in October", + "_weekday": "Mon" + }, + { + "date": "2019-11-27 00:00:00", + "start": "2019-11-26T13:00:00.000Z", + "end": "2019-11-27T13:00:00.000Z", + "name": "Thanksgiving Day", + "type": "public", + "rule": "Wednesday before 12-01", + "_weekday": "Wed" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T13:00:00.000Z", + "end": "2019-12-25T13:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2019-12-26 00:00:00", + "start": "2019-12-25T13:00:00.000Z", + "end": "2019-12-26T13:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/AU-ACT-NF-2020.json b/test/fixtures/AU-ACT-NF-2020.json new file mode 100644 index 000000000..69fd03c6e --- /dev/null +++ b/test/fixtures/AU-ACT-NF-2020.json @@ -0,0 +1,138 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T13:00:00.000Z", + "end": "2020-01-01T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2020-01-27 00:00:00", + "start": "2020-01-26T13:00:00.000Z", + "end": "2020-01-27T13:00:00.000Z", + "name": "Australia Day", + "type": "public", + "rule": "01-26 if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-03-06 00:00:00", + "start": "2020-03-05T13:00:00.000Z", + "end": "2020-03-06T13:00:00.000Z", + "name": "Foundation Day", + "type": "public", + "rule": "03-06 and if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T14:00:00.000Z", + "end": "2020-04-10T14:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-13 00:00:00", + "start": "2020-04-12T14:00:00.000Z", + "end": "2020-04-13T14:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2020-04-25 00:00:00", + "start": "2020-04-24T14:00:00.000Z", + "end": "2020-04-25T14:00:00.000Z", + "name": "Anzac Day", + "type": "public", + "rule": "04-25", + "_weekday": "Sat" + }, + { + "date": "2020-05-10 00:00:00", + "start": "2020-05-09T14:00:00.000Z", + "end": "2020-05-10T14:00:00.000Z", + "name": "Mother's Day", + "type": "observance", + "rule": "2nd sunday in May", + "_weekday": "Sun" + }, + { + "date": "2020-06-08 00:00:00", + "start": "2020-06-07T14:00:00.000Z", + "end": "2020-06-08T14:00:00.000Z", + "name": "Anniversary (Bounty) Day", + "type": "public", + "rule": "06-08 if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-06-15 00:00:00", + "start": "2020-06-14T14:00:00.000Z", + "end": "2020-06-15T14:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "monday after 2nd saturday in June if is public holiday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-09-06 00:00:00", + "start": "2020-09-05T14:00:00.000Z", + "end": "2020-09-06T14:00:00.000Z", + "name": "Father's Day", + "type": "observance", + "rule": "1st sunday in September", + "_weekday": "Sun" + }, + { + "date": "2020-10-12 00:00:00", + "start": "2020-10-11T13:00:00.000Z", + "end": "2020-10-12T13:00:00.000Z", + "name": "Norfolk Island Agricultural Show", + "type": "public", + "rule": "2nd monday in October", + "_weekday": "Mon" + }, + { + "date": "2020-11-25 00:00:00", + "start": "2020-11-24T13:00:00.000Z", + "end": "2020-11-25T13:00:00.000Z", + "name": "Thanksgiving Day", + "type": "public", + "rule": "Wednesday before 12-01", + "_weekday": "Wed" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T13:00:00.000Z", + "end": "2020-12-25T13:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Fri" + }, + { + "date": "2020-12-26 00:00:00", + "start": "2020-12-25T13:00:00.000Z", + "end": "2020-12-26T13:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2020-12-28 00:00:00", + "start": "2020-12-27T13:00:00.000Z", + "end": "2020-12-28T13:00:00.000Z", + "name": "Boxing Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/AU-ACT-NF-2021.json b/test/fixtures/AU-ACT-NF-2021.json new file mode 100644 index 000000000..156001463 --- /dev/null +++ b/test/fixtures/AU-ACT-NF-2021.json @@ -0,0 +1,157 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T13:00:00.000Z", + "end": "2021-01-01T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2021-01-26 00:00:00", + "start": "2021-01-25T13:00:00.000Z", + "end": "2021-01-26T13:00:00.000Z", + "name": "Australia Day", + "type": "public", + "rule": "01-26 if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2021-03-06 00:00:00", + "start": "2021-03-05T13:00:00.000Z", + "end": "2021-03-06T13:00:00.000Z", + "name": "Foundation Day", + "type": "public", + "rule": "03-06 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2021-03-08 00:00:00", + "start": "2021-03-07T13:00:00.000Z", + "end": "2021-03-08T13:00:00.000Z", + "name": "Foundation Day", + "type": "public", + "rule": "03-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T13:00:00.000Z", + "end": "2021-04-02T13:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-05 00:00:00", + "start": "2021-04-04T14:00:00.000Z", + "end": "2021-04-05T14:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2021-04-25 00:00:00", + "start": "2021-04-24T14:00:00.000Z", + "end": "2021-04-25T14:00:00.000Z", + "name": "Anzac Day", + "type": "public", + "rule": "04-25", + "_weekday": "Sun" + }, + { + "date": "2021-05-09 00:00:00", + "start": "2021-05-08T14:00:00.000Z", + "end": "2021-05-09T14:00:00.000Z", + "name": "Mother's Day", + "type": "observance", + "rule": "2nd sunday in May", + "_weekday": "Sun" + }, + { + "date": "2021-06-08 00:00:00", + "start": "2021-06-07T14:00:00.000Z", + "end": "2021-06-08T14:00:00.000Z", + "name": "Anniversary (Bounty) Day", + "type": "public", + "rule": "06-08 if saturday,sunday then next monday", + "_weekday": "Tue" + }, + { + "date": "2021-06-14 00:00:00", + "start": "2021-06-13T14:00:00.000Z", + "end": "2021-06-14T14:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "monday after 2nd saturday in June if is public holiday then next monday", + "_weekday": "Mon" + }, + { + "date": "2021-09-05 00:00:00", + "start": "2021-09-04T14:00:00.000Z", + "end": "2021-09-05T14:00:00.000Z", + "name": "Father's Day", + "type": "observance", + "rule": "1st sunday in September", + "_weekday": "Sun" + }, + { + "date": "2021-10-11 00:00:00", + "start": "2021-10-10T13:00:00.000Z", + "end": "2021-10-11T13:00:00.000Z", + "name": "Norfolk Island Agricultural Show", + "type": "public", + "rule": "2nd monday in October", + "_weekday": "Mon" + }, + { + "date": "2021-11-24 00:00:00", + "start": "2021-11-23T13:00:00.000Z", + "end": "2021-11-24T13:00:00.000Z", + "name": "Thanksgiving Day", + "type": "public", + "rule": "Wednesday before 12-01", + "_weekday": "Wed" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T13:00:00.000Z", + "end": "2021-12-25T13:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sat" + }, + { + "date": "2021-12-26 00:00:00", + "start": "2021-12-25T13:00:00.000Z", + "end": "2021-12-26T13:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2021-12-27 00:00:00", + "start": "2021-12-26T13:00:00.000Z", + "end": "2021-12-27T13:00:00.000Z", + "name": "Christmas Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2021-12-28 00:00:00", + "start": "2021-12-27T13:00:00.000Z", + "end": "2021-12-28T13:00:00.000Z", + "name": "Boxing Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/AU-ACT-NF-2022.json b/test/fixtures/AU-ACT-NF-2022.json new file mode 100644 index 000000000..d4b5dd13c --- /dev/null +++ b/test/fixtures/AU-ACT-NF-2022.json @@ -0,0 +1,156 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T13:00:00.000Z", + "end": "2022-01-01T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Sat" + }, + { + "date": "2022-01-03 00:00:00", + "start": "2022-01-02T13:00:00.000Z", + "end": "2022-01-03T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-01-26 00:00:00", + "start": "2022-01-25T13:00:00.000Z", + "end": "2022-01-26T13:00:00.000Z", + "name": "Australia Day", + "type": "public", + "rule": "01-26 if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2022-03-06 00:00:00", + "start": "2022-03-05T13:00:00.000Z", + "end": "2022-03-06T13:00:00.000Z", + "name": "Foundation Day", + "type": "public", + "rule": "03-06 and if saturday,sunday then next monday", + "_weekday": "Sun" + }, + { + "date": "2022-03-07 00:00:00", + "start": "2022-03-06T13:00:00.000Z", + "end": "2022-03-07T13:00:00.000Z", + "name": "Foundation Day", + "type": "public", + "rule": "03-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T14:00:00.000Z", + "end": "2022-04-15T14:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-18 00:00:00", + "start": "2022-04-17T14:00:00.000Z", + "end": "2022-04-18T14:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2022-04-25 00:00:00", + "start": "2022-04-24T14:00:00.000Z", + "end": "2022-04-25T14:00:00.000Z", + "name": "Anzac Day", + "type": "public", + "rule": "04-25", + "_weekday": "Mon" + }, + { + "date": "2022-05-08 00:00:00", + "start": "2022-05-07T14:00:00.000Z", + "end": "2022-05-08T14:00:00.000Z", + "name": "Mother's Day", + "type": "observance", + "rule": "2nd sunday in May", + "_weekday": "Sun" + }, + { + "date": "2022-06-08 00:00:00", + "start": "2022-06-07T14:00:00.000Z", + "end": "2022-06-08T14:00:00.000Z", + "name": "Anniversary (Bounty) Day", + "type": "public", + "rule": "06-08 if saturday,sunday then next monday", + "_weekday": "Wed" + }, + { + "date": "2022-06-13 00:00:00", + "start": "2022-06-12T14:00:00.000Z", + "end": "2022-06-13T14:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "monday after 2nd saturday in June if is public holiday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-09-04 00:00:00", + "start": "2022-09-03T14:00:00.000Z", + "end": "2022-09-04T14:00:00.000Z", + "name": "Father's Day", + "type": "observance", + "rule": "1st sunday in September", + "_weekday": "Sun" + }, + { + "date": "2022-10-10 00:00:00", + "start": "2022-10-09T13:00:00.000Z", + "end": "2022-10-10T13:00:00.000Z", + "name": "Norfolk Island Agricultural Show", + "type": "public", + "rule": "2nd monday in October", + "_weekday": "Mon" + }, + { + "date": "2022-11-30 00:00:00", + "start": "2022-11-29T13:00:00.000Z", + "end": "2022-11-30T13:00:00.000Z", + "name": "Thanksgiving Day", + "type": "public", + "rule": "Wednesday before 12-01", + "_weekday": "Wed" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T13:00:00.000Z", + "end": "2022-12-25T13:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Sun" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T13:00:00.000Z", + "end": "2022-12-26T13:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2022-12-27 00:00:00", + "start": "2022-12-26T13:00:00.000Z", + "end": "2022-12-27T13:00:00.000Z", + "name": "Christmas Day (substitute day)", + "type": "public", + "substitute": true, + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/AU-ACT-NF-2023.json b/test/fixtures/AU-ACT-NF-2023.json new file mode 100644 index 000000000..f226b3800 --- /dev/null +++ b/test/fixtures/AU-ACT-NF-2023.json @@ -0,0 +1,137 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T13:00:00.000Z", + "end": "2023-01-01T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T13:00:00.000Z", + "end": "2023-01-02T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-01-26 00:00:00", + "start": "2023-01-25T13:00:00.000Z", + "end": "2023-01-26T13:00:00.000Z", + "name": "Australia Day", + "type": "public", + "rule": "01-26 if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2023-03-06 00:00:00", + "start": "2023-03-05T13:00:00.000Z", + "end": "2023-03-06T13:00:00.000Z", + "name": "Foundation Day", + "type": "public", + "rule": "03-06 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T14:00:00.000Z", + "end": "2023-04-07T14:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-10 00:00:00", + "start": "2023-04-09T14:00:00.000Z", + "end": "2023-04-10T14:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2023-04-25 00:00:00", + "start": "2023-04-24T14:00:00.000Z", + "end": "2023-04-25T14:00:00.000Z", + "name": "Anzac Day", + "type": "public", + "rule": "04-25", + "_weekday": "Tue" + }, + { + "date": "2023-05-14 00:00:00", + "start": "2023-05-13T14:00:00.000Z", + "end": "2023-05-14T14:00:00.000Z", + "name": "Mother's Day", + "type": "observance", + "rule": "2nd sunday in May", + "_weekday": "Sun" + }, + { + "date": "2023-06-08 00:00:00", + "start": "2023-06-07T14:00:00.000Z", + "end": "2023-06-08T14:00:00.000Z", + "name": "Anniversary (Bounty) Day", + "type": "public", + "rule": "06-08 if saturday,sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2023-06-12 00:00:00", + "start": "2023-06-11T14:00:00.000Z", + "end": "2023-06-12T14:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "monday after 2nd saturday in June if is public holiday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-09-03 00:00:00", + "start": "2023-09-02T14:00:00.000Z", + "end": "2023-09-03T14:00:00.000Z", + "name": "Father's Day", + "type": "observance", + "rule": "1st sunday in September", + "_weekday": "Sun" + }, + { + "date": "2023-10-09 00:00:00", + "start": "2023-10-08T13:00:00.000Z", + "end": "2023-10-09T13:00:00.000Z", + "name": "Norfolk Island Agricultural Show", + "type": "public", + "rule": "2nd monday in October", + "_weekday": "Mon" + }, + { + "date": "2023-11-29 00:00:00", + "start": "2023-11-28T13:00:00.000Z", + "end": "2023-11-29T13:00:00.000Z", + "name": "Thanksgiving Day", + "type": "public", + "rule": "Wednesday before 12-01", + "_weekday": "Wed" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T13:00:00.000Z", + "end": "2023-12-25T13:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Mon" + }, + { + "date": "2023-12-26 00:00:00", + "start": "2023-12-25T13:00:00.000Z", + "end": "2023-12-26T13:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/AU-ACT-NF-2024.json b/test/fixtures/AU-ACT-NF-2024.json new file mode 100644 index 000000000..54c9cca59 --- /dev/null +++ b/test/fixtures/AU-ACT-NF-2024.json @@ -0,0 +1,119 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T13:00:00.000Z", + "end": "2024-01-01T13:00:00.000Z", + "name": "New Year's Day", + "type": "public", + "rule": "01-01 and if saturday,sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2024-01-26 00:00:00", + "start": "2024-01-25T13:00:00.000Z", + "end": "2024-01-26T13:00:00.000Z", + "name": "Australia Day", + "type": "public", + "rule": "01-26 if saturday,sunday then next monday", + "_weekday": "Fri" + }, + { + "date": "2024-03-11 00:00:00", + "start": "2024-03-10T13:00:00.000Z", + "end": "2024-03-11T13:00:00.000Z", + "name": "Canberra Day", + "type": "public", + "rule": "2nd monday in March", + "_weekday": "Mon" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T13:00:00.000Z", + "end": "2024-03-29T13:00:00.000Z", + "name": "Good Friday", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-30 00:00:00", + "start": "2024-03-29T13:00:00.000Z", + "end": "2024-03-30T13:00:00.000Z", + "name": "Easter Saturday", + "type": "public", + "rule": "easter -1", + "_weekday": "Sat" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T13:00:00.000Z", + "end": "2024-03-31T13:00:00.000Z", + "name": "Easter Sunday", + "type": "public", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-04-01 00:00:00", + "start": "2024-03-31T13:00:00.000Z", + "end": "2024-04-01T13:00:00.000Z", + "name": "Easter Monday", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2024-04-25 00:00:00", + "start": "2024-04-24T14:00:00.000Z", + "end": "2024-04-25T14:00:00.000Z", + "name": "Anzac Day", + "type": "public", + "rule": "04-25 if sunday then next monday", + "_weekday": "Thu" + }, + { + "date": "2024-05-27 00:00:00", + "start": "2024-05-26T14:00:00.000Z", + "end": "2024-05-27T14:00:00.000Z", + "name": "Reconciliation Day", + "type": "public", + "rule": "monday after 05-27", + "_weekday": "Mon" + }, + { + "date": "2024-06-10 00:00:00", + "start": "2024-06-09T14:00:00.000Z", + "end": "2024-06-10T14:00:00.000Z", + "name": "Queen's Birthday", + "type": "public", + "rule": "2nd monday in June", + "_weekday": "Mon" + }, + { + "date": "2024-10-07 00:00:00", + "start": "2024-10-06T13:00:00.000Z", + "end": "2024-10-07T13:00:00.000Z", + "name": "Labour Day", + "type": "public", + "rule": "1st monday in October", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T13:00:00.000Z", + "end": "2024-12-25T13:00:00.000Z", + "name": "Christmas Day", + "type": "public", + "rule": "12-25 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Wed" + }, + { + "date": "2024-12-26 00:00:00", + "start": "2024-12-25T13:00:00.000Z", + "end": "2024-12-26T13:00:00.000Z", + "name": "Boxing Day", + "type": "public", + "rule": "12-26 and if saturday then next monday if sunday then next tuesday", + "_weekday": "Thu" + } +] \ No newline at end of file