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(UA): Update ukrainian holidays #428

Merged
merged 1 commit into from
Sep 14, 2023
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
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@
- write test case
- [x] split project in source and data
- [ ] New Feature: Calculus for Diwali (KE, SU, IN)
- [ ] fix: https://en.wikipedia.org/wiki/Revised_Julian_calendars
25 changes: 19 additions & 6 deletions data/countries/UA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ holidays:
name:
en: New Year
substitute: true
julian 12-25 and if saturday, sunday then next monday:
julian 12-25 and if saturday, sunday then next monday prior to 2023:
_name: julian 12-25
substitute: true
03-08 and if saturday, sunday then next monday:
Expand All @@ -35,7 +35,7 @@ holidays:
05-01 and if saturday, sunday then next tuesday:
_name: 05-01
substitute: true
05-02 and if saturday, sunday then next monday:
05-02 and if saturday, sunday then next monday prior to 2018:
_name: 05-01
substitute: true
05-09 and if saturday, sunday then next monday:
Expand All @@ -46,16 +46,29 @@ holidays:
06-28 and if saturday, sunday then next monday:
_name: Constitution Day
substitute: true
07-15 and if saturday, sunday then next monday since 2023:
name:
en: Statehood Day
uk: День Української Державності
07-28 and if saturday, sunday then next monday prior to 2023:
name:
en: Statehood Day
uk: День Української Державності
08-24 and if saturday, sunday then next monday:
_name: Independence Day
substitute: true
10-14 and if saturday, sunday then next monday:
10-14 and if saturday, sunday then next monday since 2015 and prior to 2023:
name:
uk: День захисника України
en: Defender of Ukraine Day
en: Defenders of Ukraine Day
substitute: true
10-01 and if saturday, sunday then next monday since 2023:
name:
uk: День захисників і захисниць України
en: Defenders of Ukraine Day
substitute: true
active:
- from: "2015-03-05"
12-25 and if saturday, sunday then next monday since 2017:
_name: 12-25
# states:
# '05':
# name: Vinnychchyna
Expand Down
3 changes: 2 additions & 1 deletion data/names.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,9 @@ names:
sr: Католички Божић
sv: Juldagen
sw: Krismasi
vi: Lễ Giáng Sinh
ti: ልደት
uk: Різдво Христове
vi: Lễ Giáng Sinh
zh: 聖誕節
12-26:
name:
Expand Down
17 changes: 13 additions & 4 deletions test/fixtures/UA-2015.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"end": "2015-01-07T22:00:00.000Z",
"name": "Різдво",
"type": "public",
"rule": "julian 12-25 and if saturday, sunday then next monday",
"rule": "julian 12-25 and if saturday, sunday then next monday prior to 2023",
"_weekday": "Wed"
},
{
Expand Down Expand Up @@ -77,7 +77,7 @@
"end": "2015-05-02T21:00:00.000Z",
"name": "День міжнародної солідарності трудящих",
"type": "public",
"rule": "05-02 and if saturday, sunday then next monday",
"rule": "05-02 and if saturday, sunday then next monday prior to 2018",
"_weekday": "Sat"
},
{
Expand All @@ -87,7 +87,7 @@
"name": "День міжнародної солідарності трудящих (замінити день)",
"type": "public",
"substitute": true,
"rule": "05-02 and if saturday, sunday then next monday",
"rule": "05-02 and if saturday, sunday then next monday prior to 2018",
"_weekday": "Mon"
},
{
Expand Down Expand Up @@ -146,6 +146,15 @@
"rule": "06-28 and if saturday, sunday then next monday",
"_weekday": "Mon"
},
{
"date": "2015-07-28 00:00:00",
"start": "2015-07-27T21:00:00.000Z",
"end": "2015-07-28T21:00:00.000Z",
"name": "День Української Державності",
"type": "public",
"rule": "07-28 and if saturday, sunday then next monday prior to 2023",
"_weekday": "Tue"
},
{
"date": "2015-08-24 00:00:00",
"start": "2015-08-23T21:00:00.000Z",
Expand All @@ -161,7 +170,7 @@
"end": "2015-10-14T21:00:00.000Z",
"name": "День захисника України",
"type": "public",
"rule": "10-14 and if saturday, sunday then next monday",
"rule": "10-14 and if saturday, sunday then next monday since 2015 and prior to 2023",
"_weekday": "Wed"
}
]
15 changes: 12 additions & 3 deletions test/fixtures/UA-2016.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"end": "2016-01-07T22:00:00.000Z",
"name": "Різдво",
"type": "public",
"rule": "julian 12-25 and if saturday, sunday then next monday",
"rule": "julian 12-25 and if saturday, sunday then next monday prior to 2023",
"_weekday": "Thu"
},
{
Expand Down Expand Up @@ -78,7 +78,7 @@
"end": "2016-05-02T21:00:00.000Z",
"name": "День міжнародної солідарності трудящих",
"type": "public",
"rule": "05-02 and if saturday, sunday then next monday",
"rule": "05-02 and if saturday, sunday then next monday prior to 2018",
"_weekday": "Mon"
},
{
Expand Down Expand Up @@ -127,6 +127,15 @@
"rule": "06-28 and if saturday, sunday then next monday",
"_weekday": "Tue"
},
{
"date": "2016-07-28 00:00:00",
"start": "2016-07-27T21:00:00.000Z",
"end": "2016-07-28T21:00:00.000Z",
"name": "День Української Державності",
"type": "public",
"rule": "07-28 and if saturday, sunday then next monday prior to 2023",
"_weekday": "Thu"
},
{
"date": "2016-08-24 00:00:00",
"start": "2016-08-23T21:00:00.000Z",
Expand All @@ -142,7 +151,7 @@
"end": "2016-10-14T21:00:00.000Z",
"name": "День захисника України",
"type": "public",
"rule": "10-14 and if saturday, sunday then next monday",
"rule": "10-14 and if saturday, sunday then next monday since 2015 and prior to 2023",
"_weekday": "Fri"
}
]
28 changes: 23 additions & 5 deletions test/fixtures/UA-2017.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"end": "2017-01-07T22:00:00.000Z",
"name": "Різдво",
"type": "public",
"rule": "julian 12-25 and if saturday, sunday then next monday",
"rule": "julian 12-25 and if saturday, sunday then next monday prior to 2023",
"_weekday": "Sat"
},
{
Expand All @@ -43,7 +43,7 @@
"name": "Різдво (замінити день)",
"type": "public",
"substitute": true,
"rule": "julian 12-25 and if saturday, sunday then next monday",
"rule": "julian 12-25 and if saturday, sunday then next monday prior to 2023",
"_weekday": "Mon"
},
{
Expand Down Expand Up @@ -88,7 +88,7 @@
"end": "2017-05-02T21:00:00.000Z",
"name": "День міжнародної солідарності трудящих",
"type": "public",
"rule": "05-02 and if saturday, sunday then next monday",
"rule": "05-02 and if saturday, sunday then next monday prior to 2018",
"_weekday": "Tue"
},
{
Expand Down Expand Up @@ -127,6 +127,15 @@
"rule": "06-28 and if saturday, sunday then next monday",
"_weekday": "Wed"
},
{
"date": "2017-07-28 00:00:00",
"start": "2017-07-27T21:00:00.000Z",
"end": "2017-07-28T21:00:00.000Z",
"name": "День Української Державності",
"type": "public",
"rule": "07-28 and if saturday, sunday then next monday prior to 2023",
"_weekday": "Fri"
},
{
"date": "2017-08-24 00:00:00",
"start": "2017-08-23T21:00:00.000Z",
Expand All @@ -142,7 +151,7 @@
"end": "2017-10-14T21:00:00.000Z",
"name": "День захисника України",
"type": "public",
"rule": "10-14 and if saturday, sunday then next monday",
"rule": "10-14 and if saturday, sunday then next monday since 2015 and prior to 2023",
"_weekday": "Sat"
},
{
Expand All @@ -152,7 +161,16 @@
"name": "День захисника України (замінити день)",
"type": "public",
"substitute": true,
"rule": "10-14 and if saturday, sunday then next monday",
"rule": "10-14 and if saturday, sunday then next monday since 2015 and prior to 2023",
"_weekday": "Mon"
},
{
"date": "2017-12-25 00:00:00",
"start": "2017-12-24T22:00:00.000Z",
"end": "2017-12-25T22:00:00.000Z",
"name": "Різдво Христове",
"type": "public",
"rule": "12-25 and if saturday, sunday then next monday since 2017",
"_weekday": "Mon"
}
]
44 changes: 31 additions & 13 deletions test/fixtures/UA-2018.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"end": "2018-01-07T22:00:00.000Z",
"name": "Різдво",
"type": "public",
"rule": "julian 12-25 and if saturday, sunday then next monday",
"rule": "julian 12-25 and if saturday, sunday then next monday prior to 2023",
"_weekday": "Sun"
},
{
Expand All @@ -33,7 +33,7 @@
"name": "Різдво (замінити день)",
"type": "public",
"substitute": true,
"rule": "julian 12-25 and if saturday, sunday then next monday",
"rule": "julian 12-25 and if saturday, sunday then next monday prior to 2023",
"_weekday": "Mon"
},
{
Expand Down Expand Up @@ -72,15 +72,6 @@
"rule": "05-01 and if saturday, sunday then next tuesday",
"_weekday": "Tue"
},
{
"date": "2018-05-02 00:00:00",
"start": "2018-05-01T21:00:00.000Z",
"end": "2018-05-02T21:00:00.000Z",
"name": "День міжнародної солідарності трудящих",
"type": "public",
"rule": "05-02 and if saturday, sunday then next monday",
"_weekday": "Wed"
},
{
"date": "2018-05-09 00:00:00",
"start": "2018-05-08T21:00:00.000Z",
Expand Down Expand Up @@ -117,6 +108,24 @@
"rule": "06-28 and if saturday, sunday then next monday",
"_weekday": "Thu"
},
{
"date": "2018-07-28 00:00:00",
"start": "2018-07-27T21:00:00.000Z",
"end": "2018-07-28T21:00:00.000Z",
"name": "День Української Державності",
"type": "public",
"rule": "07-28 and if saturday, sunday then next monday prior to 2023",
"_weekday": "Sat"
},
{
"date": "2018-07-30 00:00:00",
"start": "2018-07-29T21:00:00.000Z",
"end": "2018-07-30T21:00:00.000Z",
"name": "День Української Державності",
"type": "public",
"rule": "07-28 and if saturday, sunday then next monday prior to 2023",
"_weekday": "Mon"
},
{
"date": "2018-08-24 00:00:00",
"start": "2018-08-23T21:00:00.000Z",
Expand All @@ -132,7 +141,7 @@
"end": "2018-10-14T21:00:00.000Z",
"name": "День захисника України",
"type": "public",
"rule": "10-14 and if saturday, sunday then next monday",
"rule": "10-14 and if saturday, sunday then next monday since 2015 and prior to 2023",
"_weekday": "Sun"
},
{
Expand All @@ -142,7 +151,16 @@
"name": "День захисника України (замінити день)",
"type": "public",
"substitute": true,
"rule": "10-14 and if saturday, sunday then next monday",
"rule": "10-14 and if saturday, sunday then next monday since 2015 and prior to 2023",
"_weekday": "Mon"
},
{
"date": "2018-12-25 00:00:00",
"start": "2018-12-24T22:00:00.000Z",
"end": "2018-12-25T22:00:00.000Z",
"name": "Різдво Христове",
"type": "public",
"rule": "12-25 and if saturday, sunday then next monday since 2017",
"_weekday": "Tue"
}
]
40 changes: 29 additions & 11 deletions test/fixtures/UA-2019.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"end": "2019-01-07T22:00:00.000Z",
"name": "Різдво",
"type": "public",
"rule": "julian 12-25 and if saturday, sunday then next monday",
"rule": "julian 12-25 and if saturday, sunday then next monday prior to 2023",
"_weekday": "Mon"
},
{
Expand Down Expand Up @@ -62,15 +62,6 @@
"rule": "05-01 and if saturday, sunday then next tuesday",
"_weekday": "Wed"
},
{
"date": "2019-05-02 00:00:00",
"start": "2019-05-01T21:00:00.000Z",
"end": "2019-05-02T21:00:00.000Z",
"name": "День міжнародної солідарності трудящих",
"type": "public",
"rule": "05-02 and if saturday, sunday then next monday",
"_weekday": "Thu"
},
{
"date": "2019-05-09 00:00:00",
"start": "2019-05-08T21:00:00.000Z",
Expand Down Expand Up @@ -107,6 +98,24 @@
"rule": "06-28 and if saturday, sunday then next monday",
"_weekday": "Fri"
},
{
"date": "2019-07-28 00:00:00",
"start": "2019-07-27T21:00:00.000Z",
"end": "2019-07-28T21:00:00.000Z",
"name": "День Української Державності",
"type": "public",
"rule": "07-28 and if saturday, sunday then next monday prior to 2023",
"_weekday": "Sun"
},
{
"date": "2019-07-29 00:00:00",
"start": "2019-07-28T21:00:00.000Z",
"end": "2019-07-29T21:00:00.000Z",
"name": "День Української Державності",
"type": "public",
"rule": "07-28 and if saturday, sunday then next monday prior to 2023",
"_weekday": "Mon"
},
{
"date": "2019-08-24 00:00:00",
"start": "2019-08-23T21:00:00.000Z",
Expand All @@ -132,7 +141,16 @@
"end": "2019-10-14T21:00:00.000Z",
"name": "День захисника України",
"type": "public",
"rule": "10-14 and if saturday, sunday then next monday",
"rule": "10-14 and if saturday, sunday then next monday since 2015 and prior to 2023",
"_weekday": "Mon"
},
{
"date": "2019-12-25 00:00:00",
"start": "2019-12-24T22:00:00.000Z",
"end": "2019-12-25T22:00:00.000Z",
"name": "Різдво Христове",
"type": "public",
"rule": "12-25 and if saturday, sunday then next monday since 2017",
"_weekday": "Wed"
}
]
Loading