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: added Georgia and Kazakhstan holidays def #47

Merged
merged 1 commit into from
Sep 22, 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
2 changes: 2 additions & 0 deletions config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ config :holidefs,
:fi,
:fr,
:gb,
:ge,
:hu,
:ie,
:it,
:kz,
:lt,
:mx,
:my,
Expand Down
2 changes: 2 additions & 0 deletions lib/holidefs.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ defmodule Holidefs do
fi: "Finland",
fr: "France",
gb: "United Kingdom",
ge: "Georgia",
hr: "Croatia",
hu: "Hungary",
ie: "Ireland",
it: "Italy",
kz: "Kazakhstan",
lt: "Lithuania",
my: "Malaysia",
mx: "Mexico",
Expand Down
158 changes: 158 additions & 0 deletions priv/calendars/definitions/ge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# Georgian holiday definitions for the Ruby Holiday gem. In Georgian (საქართველო).
#
# Updated: 2017-06-12
# Sources:
# - https://en.wikipedia.org/wiki/Public_holidays_in_Georgia
# - https://de.wikipedia.org/wiki/Feiertage_in_Georgien
# - https://translate.yandex.com/?lang=ka-en
---
months:
0:
- name: დიდი პარასკევი # Good Friday
regions: [ge]
function: orthodox_easter(year)
function_modifier: -2
- name: დიდი შაბათი # Holy Saturday
regions: [ge]
function: orthodox_easter(year)
function_modifier: -1
- name: ბრწყინვალე აღდგომის დღე # Easter Sunday
regions: [ge]
function: orthodox_easter(year)
- name: მიცვალებულთა # Easter Monday
regions: [ge]
function: orthodox_easter(year)
function_modifier: 1
1:
- name: ახალი წელი # New Year's Day
regions: [ge]
mday: 1
- name: ბედობა # Day after New Year's Day
regions: [ge]
mday: 2
- name: ქრისტეშობა # Christmas Day
regions: [ge]
mday: 7
- name: ნათლისღება # Baptism Day of our Lord Jesus Christ
regions: [ge]
mday: 19
3:
- name: დედის დღე # Mother's Day
regions: [ge]
mday: 3
- name: ქალთა საერთაშორისო დღე # International Women's Day
regions: [ge]
mday: 8
4:
- name: ეროვნული ერთიანობის დღე # Day of National Unity
regions: [ge]
mday: 9
5:
- name: ფაშიზმზე გამარჯვების დღე # Victory Day
regions: [ge]
mday: 9
- name: წმინდა მოციქულის ანდრია პირველწოდებულის საქართველოში შემოსვლის დღე # Saint Andrew the First-Called Day
regions: [ge]
mday: 12
- name: დამოუკიდებლობის დღე # Independence Day
regions: [ge]
mday: 26
8:
- name: მარიამობა # Saint Mary's Day
regions: [ge]
mday: 28
10:
- name: სვეტიცხოვლობა # Day of Svetitskhoveli Cathedral (in Mtskheta)
regions: [ge]
mday: 14
11:
- name: გიორგობა # Saint George's Day
regions: [ge]
mday: 23

tests:
- given:
date: '2017-1-1'
regions: ["ge"]
expect:
name: "ახალი წელი"
- given:
date: '2017-1-2'
regions: ["ge"]
expect:
name: "ბედობა"
- given:
date: '2017-1-7'
regions: ["ge"]
expect:
name: "ქრისტეშობა"
- given:
date: '2017-1-19'
regions: ["ge"]
expect:
name: "ნათლისღება"
- given:
date: '2017-3-3'
regions: ["ge"]
expect:
name: "დედის დღე"
- given:
date: '2017-3-8'
regions: ["ge"]
expect:
name: "ქალთა საერთაშორისო დღე"
- given:
date: '2017-4-9'
regions: ["ge"]
expect:
name: "ეროვნული ერთიანობის დღე"
- given:
date: '2017-5-9'
regions: ["ge"]
expect:
name: "ფაშიზმზე გამარჯვების დღე"
- given:
date: '2017-5-12'
regions: ["ge"]
expect:
name: "წმინდა მოციქულის ანდრია პირველწოდებულის საქართველოში შემოსვლის დღე"
- given:
date: '2017-5-26'
regions: ["ge"]
expect:
name: "დამოუკიდებლობის დღე"
- given:
date: '2017-8-28'
regions: ["ge"]
expect:
name: "მარიამობა"
- given:
date: '2017-10-14'
regions: ["ge"]
expect:
name: "სვეტიცხოვლობა"
- given:
date: '2017-11-23'
regions: ["ge"]
expect:
name: "გიორგობა"
- given:
date: ['2017-4-14', '2018-4-6', '2019-4-26']
regions: ["ge"]
expect:
name: "დიდი პარასკევი"
- given:
date: ['2017-4-15', '2018-4-7', '2019-4-27']
regions: ["ge"]
expect:
name: "დიდი შაბათი"
- given:
date: ['2017-4-16', '2018-4-8', '2019-4-28']
regions: ["ge"]
expect:
name: "ბრწყინვალე აღდგომის დღე"
- given:
date: ['2017-4-17', '2018-4-9', '2019-4-29']
regions: ["ge"]
expect:
name: "მიცვალებულთა"
128 changes: 128 additions & 0 deletions priv/calendars/definitions/kz.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Kazakhstan holiday definitions for the Ruby Holiday gem.
#
# Created: 2020-09-18
# Sources:
# - https://www.officeholidays.com/countries/kazakhstan/2020
# - https://en.wikipedia.org/wiki/Public_holidays_in_Kazakhstan
---
months:
1:
- name: Jańa jyl # New Year's Day
regions: [kz]
mday: 1
- name: Jańa jyl # 1st New Year holiday
regions: [kz]
mday: 2
3:
- name: Halyqaralyq áıelder kúni # International Women's Day
regions: [kz]
mday: 8
- name: Naýryz Meıramy # Nauryz
regions: [kz]
mday: 21
- name: Naýryz Meıramy # Nauryz
regions: [kz]
mday: 22
- name: Naýryz Meıramy # Nauryz
regions: [kz]
mday: 23
5:
- name: Qazaqstan halqynyń birligi merekesi # Kazakhstan People's Unity Day
regions: [kz]
mday: 1
- name: Otan Qorǵaýshy kuni # Defender of the Fatherland day
regions: [kz]
mday: 7
- name: Jeńis kúni # Victory Day
regions: [kz]
mday: 9
7:
- name: Astana kúni # Capital Day
regions: [kz]
mday: 6
8:
- name: Qazaqstan Respýblıkasynyń Konstıtýcıyasy kúni # Constitution day
regions: [kz]
mday: 30
12:
- name: Túńǵysh Prezıdent kúni # First President Day
regions: [kz]
mday: 1
- name: Táýelsizdik kúni # Independence day
regions: [kz]
mday: 16
- name: Táýelsizdik kúni # Independence day
regions: [kz]
mday: 17

tests:
- given:
date: ['2020-1-1']
regions: ["kz"]
expect:
name: "Jańa jyl"
- given:
date: ['2020-1-2']
regions: ["kz"]
expect:
name: "Jańa jyl"
- given:
date: '2020-3-8'
regions: ["kz"]
expect:
name: "Halyqaralyq áıelder kúni"
- given:
date: '2020-3-21'
regions: ["kz"]
expect:
name: "Naýryz Meıramy"
- given:
date: '2020-3-22'
regions: ["kz"]
expect:
name: "Naýryz Meıramy"
- given:
date: '2020-3-23'
regions: ["kz"]
expect:
name: "Naýryz Meıramy"
- given:
date: '2020-5-1'
regions: ["kz"]
expect:
name: "Qazaqstan halqynyń birligi merekesi"
- given:
date: '2020-5-7'
regions: ["kz"]
expect:
name: "Otan Qorǵaýshy kuni"
- given:
date: '2020-5-9'
regions: ["kz"]
expect:
name: "Jeńis kúni"
- given:
date: '2020-7-6'
regions: ["kz"]
expect:
name: "Astana kúni"
- given:
date: '2020-8-30'
regions: ["kz"]
expect:
name: "Qazaqstan Respýblıkasynyń Konstıtýcıyasy kúni"
- given:
date: '2020-12-1'
regions: ["kz"]
expect:
name: "Túńǵysh Prezıdent kúni"
- given:
date: '2020-12-16'
regions: ["kz"]
expect:
name: "Táýelsizdik kúni"
- given:
date: '2020-12-17'
regions: ["kz"]
expect:
name: "Táýelsizdik kúni"
54 changes: 54 additions & 0 deletions priv/gettext/cy.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Generated by `mix holidefs.gettext.extract`
# for the locale CY - Cyprus
msgid ""
msgstr ""


msgid "Green Monday"
msgstr ""

msgid "Good Friday"
msgstr ""

msgid "Easter Sunday"
msgstr ""

msgid "Easter Monday"
msgstr ""

msgid "Festival of the Flood"
msgstr ""

msgid "New Year's Day"
msgstr ""

msgid "Epiphany Day"
msgstr ""

msgid "Greek National Day"
msgstr ""

msgid "National Anniversary Day"
msgstr ""

msgid "Labour Day"
msgstr ""

msgid "Assumption of the Virgin Mary"
msgstr ""

msgid "Cyprus Independence Day"
msgstr ""

msgid "Greek National Anniversary Day"
msgstr ""

msgid "Christmas Eve"
msgstr ""

msgid "Christmas Day"
msgstr ""

msgid "Boxing Day"
msgstr ""

Loading
Loading