Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Norfolk Island #294

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
47 changes: 46 additions & 1 deletion data/countries/AU.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ holidays:
langs:
- en
zones:
- Pacific/Norfolk
- Australia/Sydney
- Australia/Lord_Howe
- Antarctica/Macquarie
Expand Down Expand Up @@ -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:
Expand Down
10 changes: 1 addition & 9 deletions data/countries/NF.todo
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
holidays:
NF:
names:
en: Norfolk Island
langs: []
zones:
- Pacific/Norfolk
dayoff: ''
days: {}
# @see "au.act.nf"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
36 changes: 18 additions & 18 deletions test/fixtures/AU-2019.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,80 +19,80 @@
},
{
"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",
"_weekday": "Fri"
},
{
"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",
"_weekday": "Sat"
},
{
"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",
"_weekday": "Sun"
},
{
"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",
"_weekday": "Mon"
},
{
"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",
"_weekday": "Thu"
},
{
"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",
"_weekday": "Sun"
},
{
"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",
"_weekday": "Sun"
},
{
"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",
"_weekday": "Wed"
},
{
"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",
Expand Down
48 changes: 24 additions & 24 deletions test/fixtures/AU-2020.json
Original file line number Diff line number Diff line change
@@ -1,107 +1,107 @@
[
{
"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",
"_weekday": "Wed"
},
{
"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",
"_weekday": "Mon"
},
{
"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",
"_weekday": "Fri"
},
{
"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",
"_weekday": "Sat"
},
{
"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",
"_weekday": "Sun"
},
{
"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",
"_weekday": "Mon"
},
{
"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",
"_weekday": "Sat"
},
{
"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",
"_weekday": "Sun"
},
{
"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",
"_weekday": "Sun"
},
{
"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",
"_weekday": "Fri"
},
{
"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",
"_weekday": "Sat"
},
{
"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,
Expand Down
Loading