holidays 0.58__py3-none-any.whl → 0.59__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. holidays/__init__.py +1 -1
  2. holidays/calendars/buddhist.py +4 -4
  3. holidays/calendars/chinese.py +8 -8
  4. holidays/calendars/hindu.py +4 -4
  5. holidays/calendars/islamic.py +25 -25
  6. holidays/countries/angola.py +2 -2
  7. holidays/countries/armenia.py +5 -2
  8. holidays/countries/azerbaijan.py +7 -2
  9. holidays/countries/belarus.py +1 -1
  10. holidays/countries/bosnia_and_herzegovina.py +2 -2
  11. holidays/countries/bulgaria.py +1 -2
  12. holidays/countries/chile.py +1 -2
  13. holidays/countries/czechia.py +6 -3
  14. holidays/countries/egypt.py +0 -1
  15. holidays/countries/france.py +1 -1
  16. holidays/countries/georgia.py +1 -1
  17. holidays/countries/germany.py +10 -0
  18. holidays/countries/hongkong.py +1 -2
  19. holidays/countries/japan.py +3 -4
  20. holidays/countries/jersey.py +2 -2
  21. holidays/countries/jordan.py +1 -1
  22. holidays/countries/kazakhstan.py +1 -1
  23. holidays/countries/kuwait.py +1 -1
  24. holidays/countries/kyrgyzstan.py +1 -1
  25. holidays/countries/malaysia.py +7 -1
  26. holidays/countries/mauritania.py +0 -1
  27. holidays/countries/moldova.py +4 -3
  28. holidays/countries/russia.py +1 -1
  29. holidays/countries/saudi_arabia.py +1 -2
  30. holidays/countries/slovakia.py +1 -1
  31. holidays/countries/south_korea.py +1 -2
  32. holidays/countries/taiwan.py +1 -2
  33. holidays/countries/ukraine.py +1 -3
  34. holidays/countries/united_arab_emirates.py +5 -2
  35. holidays/countries/united_kingdom.py +2 -2
  36. holidays/countries/united_states.py +2 -2
  37. holidays/countries/uzbekistan.py +2 -1
  38. holidays/countries/vietnam.py +116 -25
  39. holidays/groups/__init__.py +1 -0
  40. holidays/groups/buddhist.py +6 -11
  41. holidays/groups/chinese.py +7 -25
  42. holidays/groups/eastern.py +51 -0
  43. holidays/groups/hindu.py +6 -11
  44. holidays/groups/international.py +8 -5
  45. holidays/groups/islamic.py +39 -46
  46. holidays/holiday_base.py +31 -30
  47. holidays/locale/de/LC_MESSAGES/DE.mo +0 -0
  48. holidays/locale/de/LC_MESSAGES/DE.po +11 -4
  49. holidays/locale/en_US/LC_MESSAGES/DE.mo +0 -0
  50. holidays/locale/en_US/LC_MESSAGES/DE.po +13 -4
  51. holidays/locale/en_US/LC_MESSAGES/VN.mo +0 -0
  52. holidays/locale/en_US/LC_MESSAGES/VN.po +37 -19
  53. holidays/locale/th/LC_MESSAGES/DE.mo +0 -0
  54. holidays/locale/th/LC_MESSAGES/DE.po +11 -2
  55. holidays/locale/th/LC_MESSAGES/VN.mo +0 -0
  56. holidays/locale/th/LC_MESSAGES/VN.po +93 -0
  57. holidays/locale/uk/LC_MESSAGES/DE.mo +0 -0
  58. holidays/locale/uk/LC_MESSAGES/DE.po +13 -4
  59. holidays/locale/vi/LC_MESSAGES/VN.mo +0 -0
  60. holidays/locale/vi/LC_MESSAGES/VN.po +32 -14
  61. holidays/mixins.py +1 -4
  62. holidays/observed_holiday_base.py +5 -5
  63. holidays/registry.py +4 -3
  64. holidays/utils.py +8 -7
  65. {holidays-0.58.dist-info → holidays-0.59.dist-info}/METADATA +22 -38
  66. {holidays-0.58.dist-info → holidays-0.59.dist-info}/RECORD +70 -67
  67. {holidays-0.58.dist-info → holidays-0.59.dist-info}/WHEEL +1 -1
  68. {holidays-0.58.dist-info → holidays-0.59.dist-info}/AUTHORS +0 -0
  69. {holidays-0.58.dist-info → holidays-0.59.dist-info}/LICENSE +0 -0
  70. {holidays-0.58.dist-info → holidays-0.59.dist-info}/top_level.txt +0 -0
holidays/__init__.py CHANGED
@@ -23,7 +23,7 @@ from holidays.holiday_base import *
23
23
  from holidays.registry import EntityLoader
24
24
  from holidays.utils import *
25
25
 
26
- __version__ = "0.58"
26
+ __version__ = "0.59"
27
27
 
28
28
 
29
29
  EntityLoader.load("countries", globals())
@@ -11,7 +11,7 @@
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
13
  from datetime import date
14
- from typing import Optional, Tuple
14
+ from typing import Optional
15
15
 
16
16
  from holidays.calendars.custom import _CustomCalendar
17
17
  from holidays.calendars.gregorian import MAY, JUN
@@ -425,16 +425,16 @@ class _BuddhistLunisolar:
425
425
  2099: (MAY, 4),
426
426
  }
427
427
 
428
- def _get_holiday(self, holiday: str, year: int) -> Tuple[Optional[date], bool]:
428
+ def _get_holiday(self, holiday: str, year: int) -> tuple[Optional[date], bool]:
429
429
  estimated_dates = getattr(self, f"{holiday}_DATES", {})
430
430
  exact_dates = getattr(self, f"{holiday}_DATES_{_CustomCalendar.CUSTOM_ATTR_POSTFIX}", {})
431
431
  dt = exact_dates.get(year, estimated_dates.get(year, ()))
432
432
  return date(year, *dt) if dt else None, year not in exact_dates
433
433
 
434
- def vesak_date(self, year: int) -> Tuple[Optional[date], bool]:
434
+ def vesak_date(self, year: int) -> tuple[Optional[date], bool]:
435
435
  return self._get_holiday(VESAK, year)
436
436
 
437
- def vesak_may_date(self, year: int) -> Tuple[Optional[date], bool]:
437
+ def vesak_may_date(self, year: int) -> tuple[Optional[date], bool]:
438
438
  return self._get_holiday(VESAK_MAY, year)
439
439
 
440
440
 
@@ -11,7 +11,7 @@
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
13
  from datetime import date
14
- from typing import Optional, Tuple
14
+ from typing import Optional
15
15
 
16
16
  from holidays.calendars.custom import _CustomCalendar
17
17
  from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, JUN, SEP, OCT, NOV
@@ -1237,28 +1237,28 @@ class _ChineseLunisolar:
1237
1237
  2099: (SEP, 29),
1238
1238
  }
1239
1239
 
1240
- def _get_holiday(self, holiday: str, year: int) -> Tuple[Optional[date], bool]:
1240
+ def _get_holiday(self, holiday: str, year: int) -> tuple[Optional[date], bool]:
1241
1241
  estimated_dates = getattr(self, f"{holiday}_DATES", {})
1242
1242
  exact_dates = getattr(self, f"{holiday}_DATES_{_CustomCalendar.CUSTOM_ATTR_POSTFIX}", {})
1243
1243
  dt = exact_dates.get(year, estimated_dates.get(year, ()))
1244
1244
  return date(year, *dt) if dt else None, year not in exact_dates
1245
1245
 
1246
- def buddha_birthday_date(self, year: int) -> Tuple[Optional[date], bool]:
1246
+ def buddha_birthday_date(self, year: int) -> tuple[Optional[date], bool]:
1247
1247
  return self._get_holiday(BUDDHA_BIRTHDAY, year)
1248
1248
 
1249
- def double_ninth_date(self, year: int) -> Tuple[Optional[date], bool]:
1249
+ def double_ninth_date(self, year: int) -> tuple[Optional[date], bool]:
1250
1250
  return self._get_holiday(DOUBLE_NINTH, year)
1251
1251
 
1252
- def dragon_boat_date(self, year: int) -> Tuple[Optional[date], bool]:
1252
+ def dragon_boat_date(self, year: int) -> tuple[Optional[date], bool]:
1253
1253
  return self._get_holiday(DRAGON_BOAT, year)
1254
1254
 
1255
- def hung_kings_date(self, year: int) -> Tuple[Optional[date], bool]:
1255
+ def hung_kings_date(self, year: int) -> tuple[Optional[date], bool]:
1256
1256
  return self._get_holiday(HUNG_KINGS, year)
1257
1257
 
1258
- def lunar_new_year_date(self, year: int) -> Tuple[Optional[date], bool]:
1258
+ def lunar_new_year_date(self, year: int) -> tuple[Optional[date], bool]:
1259
1259
  return self._get_holiday(LUNAR_NEW_YEAR, year)
1260
1260
 
1261
- def mid_autumn_date(self, year: int) -> Tuple[Optional[date], bool]:
1261
+ def mid_autumn_date(self, year: int) -> tuple[Optional[date], bool]:
1262
1262
  return self._get_holiday(MID_AUTUMN, year)
1263
1263
 
1264
1264
 
@@ -11,7 +11,7 @@
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
13
  from datetime import date
14
- from typing import Optional, Tuple
14
+ from typing import Optional
15
15
 
16
16
  from holidays.calendars.custom import _CustomCalendar
17
17
  from holidays.calendars.gregorian import JAN, FEB, MAR, OCT, NOV
@@ -425,16 +425,16 @@ class _HinduLunisolar:
425
425
  2099: (JAN, 6),
426
426
  }
427
427
 
428
- def _get_holiday(self, holiday: str, year: int) -> Tuple[Optional[date], bool]:
428
+ def _get_holiday(self, holiday: str, year: int) -> tuple[Optional[date], bool]:
429
429
  estimated_dates = getattr(self, f"{holiday}_DATES", {})
430
430
  exact_dates = getattr(self, f"{holiday}_DATES_{_CustomCalendar.CUSTOM_ATTR_POSTFIX}", {})
431
431
  dt = exact_dates.get(year, estimated_dates.get(year, ()))
432
432
  return date(year, *dt) if dt else None, year not in exact_dates
433
433
 
434
- def diwali_date(self, year: int) -> Tuple[Optional[date], bool]:
434
+ def diwali_date(self, year: int) -> tuple[Optional[date], bool]:
435
435
  return self._get_holiday(DIWALI, year)
436
436
 
437
- def thaipusam_date(self, year: int) -> Tuple[Optional[date], bool]:
437
+ def thaipusam_date(self, year: int) -> tuple[Optional[date], bool]:
438
438
  return self._get_holiday(THAIPUSAM, year)
439
439
 
440
440
 
@@ -10,8 +10,8 @@
10
10
  # Website: https://github.com/vacanza/holidays
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
+ from collections.abc import Iterable
13
14
  from datetime import date
14
- from typing import Iterable, Tuple
15
15
 
16
16
  from holidays.calendars.custom import _CustomCalendar
17
17
  from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
@@ -3641,80 +3641,80 @@ class _IslamicLunar:
3641
3641
  2076: (DEC, 5),
3642
3642
  }
3643
3643
 
3644
- def _get_holiday(self, holiday: str, year: int) -> Iterable[Tuple[date, bool]]:
3644
+ def _get_holiday(self, holiday: str, year: int) -> Iterable[tuple[date, bool]]:
3645
3645
  estimated_dates = getattr(self, f"{holiday}_DATES", {})
3646
3646
  exact_dates = getattr(self, f"{holiday}_DATES_{_CustomCalendar.CUSTOM_ATTR_POSTFIX}", {})
3647
3647
  for year in (year - 1, year):
3648
3648
  for dt in _normalize_tuple(exact_dates.get(year, estimated_dates.get(year, ()))):
3649
3649
  yield date(year, *dt), year not in exact_dates
3650
3650
 
3651
- def ali_al_rida_death_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3651
+ def ali_al_rida_death_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3652
3652
  return self._get_holiday(ALI_AL_RIDA_DEATH, year)
3653
3653
 
3654
- def ali_birthday_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3654
+ def ali_birthday_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3655
3655
  return self._get_holiday(ALI_BIRTHDAY, year)
3656
3656
 
3657
- def ali_death_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3657
+ def ali_death_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3658
3658
  return self._get_holiday(ALI_DEATH, year)
3659
3659
 
3660
- def arbaeen_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3660
+ def arbaeen_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3661
3661
  return self._get_holiday(ARBAEEN, year)
3662
3662
 
3663
- def ashura_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3663
+ def ashura_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3664
3664
  return self._get_holiday(ASHURA, year)
3665
3665
 
3666
- def eid_al_adha_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3666
+ def eid_al_adha_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3667
3667
  return self._get_holiday(EID_AL_ADHA, year)
3668
3668
 
3669
- def eid_al_fitr_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3669
+ def eid_al_fitr_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3670
3670
  return self._get_holiday(EID_AL_FITR, year)
3671
3671
 
3672
- def eid_al_ghadir_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3672
+ def eid_al_ghadir_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3673
3673
  return self._get_holiday(EID_AL_GHADIR, year)
3674
3674
 
3675
- def fatima_death_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3675
+ def fatima_death_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3676
3676
  return self._get_holiday(FATIMA_DEATH, year)
3677
3677
 
3678
- def hari_hol_johor_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3678
+ def hari_hol_johor_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3679
3679
  return self._get_holiday(HARI_HOL_JOHOR, year)
3680
3680
 
3681
- def hasan_al_askari_death_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3681
+ def hasan_al_askari_death_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3682
3682
  return self._get_holiday(HASAN_AL_ASKARI_DEATH, year)
3683
3683
 
3684
- def hijri_new_year_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3684
+ def hijri_new_year_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3685
3685
  return self._get_holiday(HIJRI_NEW_YEAR, year)
3686
3686
 
3687
- def imam_mahdi_birthday_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3687
+ def imam_mahdi_birthday_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3688
3688
  return self._get_holiday(IMAM_MAHDI_BIRTHDAY, year)
3689
3689
 
3690
- def isra_and_miraj_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3690
+ def isra_and_miraj_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3691
3691
  return self._get_holiday(ISRA_AND_MIRAJ, year)
3692
3692
 
3693
- def maldives_embraced_islam_day_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3693
+ def maldives_embraced_islam_day_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3694
3694
  return self._get_holiday(MALDIVES_EMBRACED_ISLAM_DAY, year)
3695
3695
 
3696
- def mawlid_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3696
+ def mawlid_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3697
3697
  return self._get_holiday(MAWLID, year)
3698
3698
 
3699
- def nuzul_al_quran_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3699
+ def nuzul_al_quran_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3700
3700
  return self._get_holiday(NUZUL_AL_QURAN, year)
3701
3701
 
3702
- def prophet_death_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3702
+ def prophet_death_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3703
3703
  return self._get_holiday(PROPHET_DEATH, year)
3704
3704
 
3705
- def quamee_dhuvas_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3705
+ def quamee_dhuvas_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3706
3706
  return self._get_holiday(QUAMEE_DHUVAS, year)
3707
3707
 
3708
- def ramadan_beginning_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3708
+ def ramadan_beginning_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3709
3709
  return self._get_holiday(RAMADAN_BEGINNING, year)
3710
3710
 
3711
- def sadiq_birthday_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3711
+ def sadiq_birthday_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3712
3712
  return self._get_holiday(SADIQ_BIRTHDAY, year)
3713
3713
 
3714
- def sadiq_death_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3714
+ def sadiq_death_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3715
3715
  return self._get_holiday(SADIQ_DEATH, year)
3716
3716
 
3717
- def tasua_dates(self, year: int) -> Iterable[Tuple[date, bool]]:
3717
+ def tasua_dates(self, year: int) -> Iterable[tuple[date, bool]]:
3718
3718
  return self._get_holiday(TASUA, year)
3719
3719
 
3720
3720
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  from datetime import date
14
14
  from gettext import gettext as tr
15
- from typing import Optional, Tuple
15
+ from typing import Optional
16
16
 
17
17
  from holidays.calendars.gregorian import AUG, SEP
18
18
  from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
@@ -59,7 +59,7 @@ class Angola(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
59
59
  # it rolls over to the following Monday.
60
60
  return dt >= date(1996, SEP, 27)
61
61
 
62
- def _add_observed(self, dt: date, **kwargs) -> Tuple[bool, Optional[date]]:
62
+ def _add_observed(self, dt: date, **kwargs) -> tuple[bool, Optional[date]]:
63
63
  # As per Law # #11/18, from 2018/9/10, when public holiday falls on Tuesday or Thursday,
64
64
  # the Monday or Friday is also a holiday.
65
65
  kwargs.setdefault(
@@ -82,8 +82,11 @@ class Armenia(HolidayBase, ChristianHolidays, InternationalHolidays):
82
82
  )
83
83
 
84
84
  if self._year >= 1995:
85
- # Victory and Peace Day.
86
- self._add_world_war_two_victory_day(tr("Հաղթանակի և Խաղաղության տոն"))
85
+ self._add_world_war_two_victory_day(
86
+ # Victory and Peace Day.
87
+ tr("Հաղթանակի և Խաղաղության տոն"),
88
+ is_western=False,
89
+ )
87
90
 
88
91
  # Republic Day.
89
92
  self._add_holiday_may_28(tr("Հանրապետության օր"))
@@ -78,8 +78,13 @@ class Azerbaijan(ObservedHolidayBase, InternationalHolidays, IslamicHolidays, St
78
78
  dts_observed.add(self._add_holiday_mar_23(name))
79
79
  dts_observed.add(self._add_holiday_mar_24(name))
80
80
 
81
- # Victory over Fascism Day.
82
- dts_observed.add(self._add_world_war_two_victory_day(tr("Faşizm üzərində qələbə günü")))
81
+ dts_observed.add(
82
+ self._add_world_war_two_victory_day(
83
+ # Victory over Fascism Day.
84
+ tr("Faşizm üzərində qələbə günü"),
85
+ is_western=False,
86
+ )
87
+ )
83
88
 
84
89
  if self._year >= 1992:
85
90
  dts_observed.add(
@@ -64,7 +64,7 @@ class Belarus(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
64
64
  self._add_labor_day(tr("Свята працы"))
65
65
 
66
66
  # Victory Day.
67
- self._add_world_war_two_victory_day(tr("Дзень Перамогі"))
67
+ self._add_world_war_two_victory_day(tr("Дзень Перамогі"), is_western=False)
68
68
 
69
69
  # Independence Day.
70
70
  self._add_holiday_jul_3(tr("Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)"))
@@ -146,7 +146,7 @@ class BosniaAndHerzegovina(
146
146
  self._add_labor_day_two(name)
147
147
 
148
148
  # Victory Day.
149
- self._add_world_war_two_victory_day(tr("Dan pobjede nad fašizmom"))
149
+ self._add_world_war_two_victory_day(tr("Dan pobjede nad fašizmom"), is_western=False)
150
150
 
151
151
  # Statehood Day.
152
152
  self._add_holiday_nov_25(tr("Dan državnosti"))
@@ -220,7 +220,7 @@ class BosniaAndHerzegovina(
220
220
  self._add_labor_day_two(name)
221
221
 
222
222
  # Victory Day.
223
- self._add_world_war_two_victory_day(tr("Dan pobjede nad fašizmom"))
223
+ self._add_world_war_two_victory_day(tr("Dan pobjede nad fašizmom"), is_western=False)
224
224
 
225
225
  self._add_holiday_nov_21(
226
226
  # Dayton Agreement Day.
@@ -12,7 +12,6 @@
12
12
 
13
13
  from datetime import date
14
14
  from gettext import gettext as tr
15
- from typing import Set
16
15
 
17
16
  from holidays.calendars.julian_revised import JULIAN_REVISED_CALENDAR
18
17
  from holidays.constants import PUBLIC, SCHOOL
@@ -57,7 +56,7 @@ class Bulgaria(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
57
56
  kwargs.setdefault("observed_since", 2017)
58
57
  super().__init__(*args, **kwargs)
59
58
 
60
- def _populate_observed(self, dts: Set[date], excluded_names: Set[str]) -> None:
59
+ def _populate_observed(self, dts: set[date], excluded_names: set[str]) -> None:
61
60
  for dt in sorted(dts):
62
61
  if not self._is_observed(dt):
63
62
  continue
@@ -11,7 +11,6 @@
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
13
  from gettext import gettext as tr
14
- from typing import Tuple
15
14
 
16
15
  from holidays.calendars.gregorian import JUN, SEP, DEC
17
16
  from holidays.constants import BANK, PUBLIC
@@ -226,7 +225,7 @@ class Chile(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stati
226
225
  self._add_holiday_dec_31(name)
227
226
 
228
227
  @property
229
- def _summer_solstice_date(self) -> Tuple[int, int]:
228
+ def _summer_solstice_date(self) -> tuple[int, int]:
230
229
  day = 20
231
230
  if (self._year % 4 > 1 and self._year <= 2046) or (
232
231
  self._year % 4 > 2 and self._year <= 2075
@@ -52,10 +52,13 @@ class Czechia(HolidayBase, ChristianHolidays, InternationalHolidays):
52
52
 
53
53
  if self._year >= 1992:
54
54
  # Victory Day.
55
- self._add_holiday_may_8(tr("Den vítězství"))
55
+ self._add_world_war_two_victory_day(tr("Den vítězství"))
56
56
  elif self._year >= 1947:
57
- # Day of Victory over Fascism.
58
- self._add_world_war_two_victory_day(tr("Den vítězství nad hitlerovským fašismem"))
57
+ self._add_world_war_two_victory_day(
58
+ # Day of Victory over Fascism.
59
+ tr("Den vítězství nad hitlerovským fašismem"),
60
+ is_western=False,
61
+ )
59
62
 
60
63
  if self._year >= 1951:
61
64
  # Saints Cyril and Methodius Day.
@@ -39,7 +39,6 @@ class Egypt(HolidayBase, ChristianHolidays, IslamicHolidays, InternationalHolida
39
39
  ChristianHolidays.__init__(self, JULIAN_CALENDAR)
40
40
  InternationalHolidays.__init__(self)
41
41
  IslamicHolidays.__init__(self)
42
-
43
42
  super().__init__(*args, **kwargs)
44
43
 
45
44
  def _populate_public_holidays(self):
@@ -85,7 +85,7 @@ class France(HolidayBase, ChristianHolidays, InternationalHolidays):
85
85
 
86
86
  if 1953 <= self._year <= 1959 or self._year >= 1982:
87
87
  # Victory Day.
88
- self._add_holiday_may_8(tr("Fête de la Victoire"))
88
+ self._add_world_war_two_victory_day(tr("Fête de la Victoire"))
89
89
 
90
90
  if self._year >= 1880:
91
91
  # National Day.
@@ -76,7 +76,7 @@ class Georgia(HolidayBase, ChristianHolidays, InternationalHolidays):
76
76
  self._add_holiday_apr_9(tr("ეროვნული ერთიანობის დღე"))
77
77
 
78
78
  # Day of Victory over Fascism.
79
- self._add_world_war_two_victory_day(tr("ფაშიზმზე გამარჯვების დღე"))
79
+ self._add_world_war_two_victory_day(tr("ფაშიზმზე გამარჯვების დღე"), is_western=False)
80
80
 
81
81
  # Saint Andrew's Day.
82
82
  self._add_holiday_may_12(tr("წმინდა ანდრია პირველწოდებულის დღე"))
@@ -319,4 +319,14 @@ class GermanyStaticHolidays:
319
319
  "und der Beendigung des Zweiten Weltkriegs in Europa"
320
320
  ),
321
321
  ),
322
+ 2025: (
323
+ MAY,
324
+ 8,
325
+ # 80th anniversary of the liberation from Nazism and
326
+ # the end of the Second World War in Europe.
327
+ tr(
328
+ "80. Jahrestag der Befreiung vom Nationalsozialismus "
329
+ "und der Beendigung des Zweiten Weltkriegs in Europa"
330
+ ),
331
+ ),
322
332
  }
@@ -11,7 +11,6 @@
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
13
  from datetime import date
14
- from typing import Tuple
15
14
 
16
15
  from holidays.calendars.gregorian import (
17
16
  JAN,
@@ -416,7 +415,7 @@ class HongKong(
416
415
  self._add_holiday_aug_30(name)
417
416
 
418
417
  @property
419
- def _winter_solstice_date(self) -> Tuple[int, int]:
418
+ def _winter_solstice_date(self) -> tuple[int, int]:
420
419
  # This approximation is reliable for 1952-2099 years.
421
420
  if (
422
421
  (self._year % 4 == 0 and self._year >= 1988)
@@ -12,7 +12,6 @@
12
12
 
13
13
  from datetime import date
14
14
  from gettext import gettext as tr
15
- from typing import Set, Tuple
16
15
 
17
16
  from holidays.calendars.gregorian import (
18
17
  FEB,
@@ -54,7 +53,7 @@ class Japan(ObservedHolidayBase, InternationalHolidays, StaticHolidays):
54
53
  def _is_observed(self, dt: date) -> bool:
55
54
  return dt >= date(1973, APR, 12)
56
55
 
57
- def _populate_observed(self, dts: Set[date]) -> None:
56
+ def _populate_observed(self, dts: set[date]) -> None:
58
57
  # When a national holiday falls on Sunday, next working day
59
58
  # shall become a public holiday (振替休日) - substitute holiday.
60
59
  for dt in sorted(dts):
@@ -211,7 +210,7 @@ class Japan(ObservedHolidayBase, InternationalHolidays, StaticHolidays):
211
210
  self._add_new_years_eve(name)
212
211
 
213
212
  @property
214
- def _vernal_equinox_date(self) -> Tuple[int, int]:
213
+ def _vernal_equinox_date(self) -> tuple[int, int]:
215
214
  day = 20
216
215
  if (
217
216
  (self._year % 4 == 0 and self._year <= 1956)
@@ -225,7 +224,7 @@ class Japan(ObservedHolidayBase, InternationalHolidays, StaticHolidays):
225
224
  return MAR, day
226
225
 
227
226
  @property
228
- def _autumnal_equinox_date(self) -> Tuple[int, int]:
227
+ def _autumnal_equinox_date(self) -> tuple[int, int]:
229
228
  day = 23
230
229
  if self._year % 4 == 3 and self._year <= 1979:
231
230
  day = 24
@@ -11,7 +11,7 @@
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
13
  from datetime import date
14
- from typing import Optional, Tuple
14
+ from typing import Optional
15
15
 
16
16
  from holidays.calendars.gregorian import JAN, APR, MAY, JUN, JUL, SEP, OCT, DEC
17
17
  from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
@@ -56,7 +56,7 @@ class Jersey(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
56
56
  kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_WORKDAY)
57
57
  ObservedHolidayBase.__init__(self, *args, **kwargs)
58
58
 
59
- def _add_observed(self, dt: date, **kwargs) -> Tuple[bool, Optional[date]]:
59
+ def _add_observed(self, dt: date, **kwargs) -> tuple[bool, Optional[date]]:
60
60
  # Prior to 2004, in-lieu are only given for Sundays.
61
61
  # https://www.jerseylaw.je/laws/enacted/Pages/RO-123-2004.aspx
62
62
  kwargs.setdefault(
@@ -39,7 +39,7 @@ class Jordan(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolid
39
39
  def _populate_public_holidays(self):
40
40
  # The resting days are Friday and Saturday since Jan 6, 2000.
41
41
  # https://archive.wfn.org/2000/01/msg00078.html
42
- self.weekend = {FRI, SAT} if self._year >= 2000 else {THU, FRI}
42
+ self.weekend = {THU, FRI} if self._year <= 1999 else {FRI, SAT}
43
43
 
44
44
  # New Year's Day.
45
45
  self._add_new_years_day(tr("رأس السنة الميلادية"))
@@ -130,7 +130,7 @@ class Kazakhstan(
130
130
  dts_observed.add(self._add_holiday_may_7(tr("Отан Қорғаушы күні")))
131
131
 
132
132
  # Victory Day.
133
- dt = self._add_world_war_two_victory_day(tr("Жеңіс күні"))
133
+ dt = self._add_world_war_two_victory_day(tr("Жеңіс күні"), is_western=False)
134
134
  if self._year != 2020:
135
135
  dts_observed.add(dt)
136
136
 
@@ -39,7 +39,7 @@ class Kuwait(HolidayBase, InternationalHolidays, IslamicHolidays):
39
39
  def _populate_public_holidays(self):
40
40
  # The resting days are Friday and Saturday since Sep 1, 2007.
41
41
  # https://www.arabnews.com/node/298933
42
- self.weekend = {FRI, SAT} if self._year >= 2007 else {THU, FRI}
42
+ self.weekend = {THU, FRI} if self._year <= 2006 else {FRI, SAT}
43
43
 
44
44
  # New Year's Day.
45
45
  self._add_new_years_day(tr("رأس السنة الميلادية"))
@@ -58,7 +58,7 @@ class Kyrgyzstan(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicH
58
58
  self._add_holiday_may_5("Constitution Day")
59
59
 
60
60
  # Victory Day.
61
- self._add_world_war_two_victory_day("Victory Day")
61
+ self._add_world_war_two_victory_day("Victory Day", is_western=False)
62
62
 
63
63
  # Independence Day.
64
64
  self._add_holiday_aug_31("Independence Day")
@@ -33,6 +33,7 @@ from holidays.calendars.gregorian import (
33
33
  DEC,
34
34
  FRI,
35
35
  SAT,
36
+ SUN,
36
37
  )
37
38
  from holidays.groups import (
38
39
  BuddhistCalendarHolidays,
@@ -220,12 +221,17 @@ class Malaysia(
220
221
 
221
222
  super()._populate_subdiv_holidays()
222
223
 
223
- if self.subdiv in {"01", "02"}:
224
+ if (
225
+ self.subdiv == "01" and (self._year <= 1994 or 2014 <= self._year <= 2024)
226
+ ) or self.subdiv == "02":
224
227
  self._observed_rule = FRI_TO_NEXT_WORKDAY
225
228
  self.weekend = {FRI, SAT}
226
229
  elif self.subdiv in {"03", "11"}:
227
230
  self._observed_rule = SAT_TO_NEXT_WORKDAY
228
231
  self.weekend = {FRI, SAT}
232
+ else:
233
+ self._observed_rule = SUN_TO_NEXT_WORKDAY
234
+ self.weekend = {SAT, SUN}
229
235
 
230
236
  if self.observed:
231
237
  self._populate_observed(self.dts_observed)
@@ -28,7 +28,6 @@ class Mauritania(HolidayBase, InternationalHolidays, IslamicHolidays):
28
28
  def __init__(self, *args, **kwargs):
29
29
  InternationalHolidays.__init__(self)
30
30
  IslamicHolidays.__init__(self)
31
-
32
31
  super().__init__(*args, **kwargs)
33
32
 
34
33
  def _populate(self, year):
@@ -64,15 +64,16 @@ class Moldova(HolidayBase, ChristianHolidays, InternationalHolidays):
64
64
  # International Workers' Solidarity Day.
65
65
  self._add_labor_day(tr("Ziua internaţională a solidarităţii oamenilor muncii"))
66
66
 
67
- may_9 = self._add_world_war_two_victory_day(
67
+ self._add_world_war_two_victory_day(
68
68
  # Victory Day and Commemoration of the heroes fallen for
69
69
  # Independence of Fatherland.
70
- tr("Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei")
70
+ tr("Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"),
71
+ is_western=False,
71
72
  )
72
73
 
73
74
  if self._year >= 2017:
74
75
  # Europe Day.
75
- self._add_holiday(tr("Ziua Europei"), may_9)
76
+ self._add_holiday_may_9(tr("Ziua Europei"))
76
77
 
77
78
  if self._year >= 2016:
78
79
  # International Children's Day.
@@ -75,7 +75,7 @@ class Russia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
75
75
  self._add_labor_day_two(name)
76
76
 
77
77
  # Victory Day.
78
- self._add_world_war_two_victory_day(tr("День Победы"))
78
+ self._add_world_war_two_victory_day(tr("День Победы"), is_western=False)
79
79
 
80
80
  if self._year >= 1992:
81
81
  self._add_holiday_jun_12(
@@ -12,7 +12,6 @@
12
12
 
13
13
  from datetime import date
14
14
  from gettext import gettext as tr
15
- from typing import Set
16
15
 
17
16
  from holidays.calendars.gregorian import JAN, FEB, SEP, NOV, THU, FRI, SAT, _timedelta
18
17
  from holidays.groups import IslamicHolidays, StaticHolidays
@@ -58,7 +57,7 @@ class SaudiArabia(ObservedHolidayBase, IslamicHolidays, StaticHolidays):
58
57
  kwargs.setdefault("observed_rule", FRI_TO_PREV_THU + SAT_TO_NEXT_SUN)
59
58
  super().__init__(*args, **kwargs)
60
59
 
61
- def _add_islamic_observed(self, dts: Set[date]) -> None:
60
+ def _add_islamic_observed(self, dts: set[date]) -> None:
62
61
  # Observed days are added to make up for any days falling on a weekend.
63
62
  if not self.observed:
64
63
  return None
@@ -60,7 +60,7 @@ class Slovakia(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHoli
60
60
 
61
61
  if self._year >= 1997:
62
62
  # Day of Victory over Fascism.
63
- self._add_holiday_may_8(tr("Deň víťazstva nad fašizmom"))
63
+ self._add_world_war_two_victory_day(tr("Deň víťazstva nad fašizmom"))
64
64
 
65
65
  # Saints Cyril and Methodius Day.
66
66
  self._add_holiday_jul_5(tr("Sviatok svätého Cyrila a svätého Metoda"))
@@ -13,7 +13,6 @@
13
13
  import warnings
14
14
  from datetime import date
15
15
  from gettext import gettext as tr
16
- from typing import Dict, Set
17
16
 
18
17
  from holidays.calendars import _CustomChineseHolidays
19
18
  from holidays.calendars.gregorian import (
@@ -103,7 +102,7 @@ class SouthKorea(
103
102
  kwargs.setdefault("observed_since", 2014)
104
103
  super().__init__(*args, **kwargs)
105
104
 
106
- def _populate_observed(self, dts: Set[date], three_day_holidays: Dict[date, str]) -> None:
105
+ def _populate_observed(self, dts: set[date], three_day_holidays: dict[date, str]) -> None:
107
106
  for dt in sorted(dts.union(three_day_holidays.keys())):
108
107
  if not self._is_observed(dt):
109
108
  continue