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

fix(NZ,#288): add Matariki and missing regions #291

Merged
merged 2 commits into from
Dec 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,18 +389,24 @@ Countries: 194
├── NO: Norge
├── NZ: New Zealand
│ ├── AUK: Auckland Province
│ ├── BOP: Bay of Plenty
│ ├── CAN: Canterbury
│ │ └── S: South Canterbury
│ │ └── Timaru: Timaru District
│ ├── 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
│ └── Buller: Buller district
├── PA: Panamá
├── PE: Perú
│ └── CUS: Cuzco
Expand Down
198 changes: 185 additions & 13 deletions data/countries/NZ.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ holidays:
NZ:
names:
en: New Zealand
mi: Aotearoa
dayoff: sunday
langs:
- en
- mi
zones:
- Pacific/Auckland
- Pacific/Chatham
Expand Down Expand Up @@ -44,85 +46,255 @@ 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
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:
name: Canterbury
names:
en: Canterbury
mi: Waitaha
days:
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:
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
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:
name: Hawke's Bay
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
MBH:
name: Marlborough
names:
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:
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:
# 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
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
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:
2nd monday in March:
name:
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:
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:
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
9 changes: 9 additions & 0 deletions test/fixtures/NZ-2022.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 9 additions & 0 deletions test/fixtures/NZ-2023.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 9 additions & 0 deletions test/fixtures/NZ-2024.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 9 additions & 0 deletions test/fixtures/NZ-2025.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 9 additions & 0 deletions test/fixtures/NZ-AUK-2022.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading