Skip to content

Commit

Permalink
Update InternationalHolidays::_add_world_war_two_victory_day() meth…
Browse files Browse the repository at this point in the history
…od (#2064)
  • Loading branch information
KJhellico authored Oct 18, 2024
1 parent 96d85fa commit 1e81ae8
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 28 deletions.
7 changes: 5 additions & 2 deletions holidays/countries/armenia.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@ def _populate_public_holidays(self):
)

if self._year >= 1995:
# Victory and Peace Day.
self._add_world_war_two_victory_day(tr("Հաղթանակի և Խաղաղության տոն"))
self._add_world_war_two_victory_day(
# Victory and Peace Day.
tr("Հաղթանակի և Խաղաղության տոն"),
is_western=False,
)

# Republic Day.
self._add_holiday_may_28(tr("Հանրապետության օր"))
Expand Down
9 changes: 7 additions & 2 deletions holidays/countries/azerbaijan.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,13 @@ def _populate_public_holidays(self):
dts_observed.add(self._add_holiday_mar_23(name))
dts_observed.add(self._add_holiday_mar_24(name))

# Victory over Fascism Day.
dts_observed.add(self._add_world_war_two_victory_day(tr("Faşizm üzərində qələbə günü")))
dts_observed.add(
self._add_world_war_two_victory_day(
# Victory over Fascism Day.
tr("Faşizm üzərində qələbə günü"),
is_western=False,
)
)

if self._year >= 1992:
dts_observed.add(
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/belarus.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def _populate_public_holidays(self):
self._add_labor_day(tr("Свята працы"))

# Victory Day.
self._add_world_war_two_victory_day(tr("Дзень Перамогі"))
self._add_world_war_two_victory_day(tr("Дзень Перамогі"), is_western=False)

# Independence Day.
self._add_holiday_jul_3(tr("Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)"))
Expand Down
4 changes: 2 additions & 2 deletions holidays/countries/bosnia_and_herzegovina.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def _populate_subdiv_bih_public_holidays(self):
self._add_labor_day_two(name)

# Victory Day.
self._add_world_war_two_victory_day(tr("Dan pobjede nad fašizmom"))
self._add_world_war_two_victory_day(tr("Dan pobjede nad fašizmom"), is_western=False)

# Statehood Day.
self._add_holiday_nov_25(tr("Dan državnosti"))
Expand Down Expand Up @@ -220,7 +220,7 @@ def _populate_subdiv_srp_public_holidays(self):
self._add_labor_day_two(name)

# Victory Day.
self._add_world_war_two_victory_day(tr("Dan pobjede nad fašizmom"))
self._add_world_war_two_victory_day(tr("Dan pobjede nad fašizmom"), is_western=False)

self._add_holiday_nov_21(
# Dayton Agreement Day.
Expand Down
9 changes: 6 additions & 3 deletions holidays/countries/czechia.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,13 @@ def _populate_public_holidays(self):

if self._year >= 1992:
# Victory Day.
self._add_holiday_may_8(tr("Den vítězství"))
self._add_world_war_two_victory_day(tr("Den vítězství"))
elif self._year >= 1947:
# Day of Victory over Fascism.
self._add_world_war_two_victory_day(tr("Den vítězství nad hitlerovským fašismem"))
self._add_world_war_two_victory_day(
# Day of Victory over Fascism.
tr("Den vítězství nad hitlerovským fašismem"),
is_western=False,
)

if self._year >= 1951:
# Saints Cyril and Methodius Day.
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/france.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def _populate_public_holidays(self):

if 1953 <= self._year <= 1959 or self._year >= 1982:
# Victory Day.
self._add_holiday_may_8(tr("Fête de la Victoire"))
self._add_world_war_two_victory_day(tr("Fête de la Victoire"))

if self._year >= 1880:
# National Day.
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/georgia.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def _populate_public_holidays(self):
self._add_holiday_apr_9(tr("ეროვნული ერთიანობის დღე"))

# Day of Victory over Fascism.
self._add_world_war_two_victory_day(tr("ფაშიზმზე გამარჯვების დღე"))
self._add_world_war_two_victory_day(tr("ფაშიზმზე გამარჯვების დღე"), is_western=False)

# Saint Andrew's Day.
self._add_holiday_may_12(tr("წმინდა ანდრია პირველწოდებულის დღე"))
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/kazakhstan.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def _populate_public_holidays(self):
dts_observed.add(self._add_holiday_may_7(tr("Отан Қорғаушы күні")))

# Victory Day.
dt = self._add_world_war_two_victory_day(tr("Жеңіс күні"))
dt = self._add_world_war_two_victory_day(tr("Жеңіс күні"), is_western=False)
if self._year != 2020:
dts_observed.add(dt)

Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/kyrgyzstan.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _populate_public_holidays(self):
self._add_holiday_may_5("Constitution Day")

# Victory Day.
self._add_world_war_two_victory_day("Victory Day")
self._add_world_war_two_victory_day("Victory Day", is_western=False)

# Independence Day.
self._add_holiday_aug_31("Independence Day")
Expand Down
7 changes: 4 additions & 3 deletions holidays/countries/moldova.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,16 @@ def _populate_public_holidays(self):
# International Workers' Solidarity Day.
self._add_labor_day(tr("Ziua internaţională a solidarităţii oamenilor muncii"))

may_9 = self._add_world_war_two_victory_day(
self._add_world_war_two_victory_day(
# Victory Day and Commemoration of the heroes fallen for
# Independence of Fatherland.
tr("Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei")
tr("Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"),
is_western=False,
)

if self._year >= 2017:
# Europe Day.
self._add_holiday(tr("Ziua Europei"), may_9)
self._add_holiday_may_9(tr("Ziua Europei"))

if self._year >= 2016:
# International Children's Day.
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/russia.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _populate_public_holidays(self):
self._add_labor_day_two(name)

# Victory Day.
self._add_world_war_two_victory_day(tr("День Победы"))
self._add_world_war_two_victory_day(tr("День Победы"), is_western=False)

if self._year >= 1992:
self._add_holiday_jun_12(
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/slovakia.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def _populate_public_holidays(self):

if self._year >= 1997:
# Day of Victory over Fascism.
self._add_holiday_may_8(tr("Deň víťazstva nad fašizmom"))
self._add_world_war_two_victory_day(tr("Deň víťazstva nad fašizmom"))

# Saints Cyril and Methodius Day.
self._add_holiday_jul_5(tr("Sviatok svätého Cyrila a svätého Metoda"))
Expand Down
4 changes: 1 addition & 3 deletions holidays/countries/ukraine.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ def _populate_common(self, is_martial_law: bool = False):
else tr("День перемоги")
)
dts_observed.add(
self._add_holiday_may_8(name)
if self._year >= 2024
else self._add_world_war_two_victory_day(name)
self._add_world_war_two_victory_day(name, is_western=(self._year >= 2024))
)

if self._year >= 1997:
Expand Down
3 changes: 2 additions & 1 deletion holidays/countries/uzbekistan.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def _populate_public_holidays(self):
tr("Xotira va qadrlash kuni")
if self._year >= 1999
# Victory Day.
else tr("G‘alaba kuni")
else tr("G‘alaba kuni"),
is_western=False,
)
)

Expand Down
13 changes: 8 additions & 5 deletions holidays/groups/international.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,18 @@ def _add_womens_day(self, name):
"""
return self._add_holiday_mar_8(name)

def _add_world_war_two_victory_day(self, name):
def _add_world_war_two_victory_day(self, name, is_western=True):
"""
Add Victory Day (May 9th)
Add Day of Victory in World War II in Europe (May 8).
https://en.wikipedia.org/wiki/Victory_in_Europe_Day
Victory Day is a holiday that commemorates the victory over Nazi
Germany in 1945.
Some Eastern European countries celebrate Victory Day on May 9.
https://en.wikipedia.org/wiki/Victory_Day_(9_May)
"""
return self._add_holiday_may_9(name)
if is_western:
return self._add_holiday_may_8(name)
else:
return self._add_holiday_may_9(name)

def _add_united_nations_day(self, name):
"""
Expand Down

0 comments on commit 1e81ae8

Please sign in to comment.