holidays 0.68__py3-none-any.whl → 0.69__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 (92) hide show
  1. holidays/calendars/__init__.py +1 -0
  2. holidays/calendars/balinese_saka.py +112 -0
  3. holidays/calendars/hindu.py +865 -1
  4. holidays/constants.py +1 -0
  5. holidays/countries/__init__.py +1 -0
  6. holidays/countries/afghanistan.py +8 -2
  7. holidays/countries/albania.py +8 -2
  8. holidays/countries/algeria.py +6 -2
  9. holidays/countries/american_samoa.py +6 -2
  10. holidays/countries/azerbaijan.py +8 -2
  11. holidays/countries/bahrain.py +8 -2
  12. holidays/countries/bosnia_and_herzegovina.py +8 -2
  13. holidays/countries/brunei.py +8 -2
  14. holidays/countries/burkina_faso.py +8 -2
  15. holidays/countries/burundi.py +6 -2
  16. holidays/countries/cameroon.py +8 -2
  17. holidays/countries/chad.py +8 -2
  18. holidays/countries/djibouti.py +6 -2
  19. holidays/countries/egypt.py +6 -2
  20. holidays/countries/ethiopia.py +8 -2
  21. holidays/countries/gabon.py +8 -2
  22. holidays/countries/ghana.py +6 -2
  23. holidays/countries/guam.py +6 -2
  24. holidays/countries/hongkong.py +38 -52
  25. holidays/countries/india.py +482 -166
  26. holidays/countries/indonesia.py +14 -58
  27. holidays/countries/iran.py +8 -2
  28. holidays/countries/jordan.py +6 -2
  29. holidays/countries/kazakhstan.py +8 -2
  30. holidays/countries/kenya.py +8 -2
  31. holidays/countries/kuwait.py +6 -2
  32. holidays/countries/kyrgyzstan.py +6 -2
  33. holidays/countries/macau.py +474 -0
  34. holidays/countries/malaysia.py +9 -3
  35. holidays/countries/maldives.py +6 -2
  36. holidays/countries/mauritania.py +6 -2
  37. holidays/countries/montenegro.py +8 -2
  38. holidays/countries/morocco.py +6 -2
  39. holidays/countries/nigeria.py +6 -2
  40. holidays/countries/north_macedonia.py +6 -2
  41. holidays/countries/northern_mariana_islands.py +6 -2
  42. holidays/countries/pakistan.py +8 -2
  43. holidays/countries/philippines.py +13 -3
  44. holidays/countries/poland.py +1 -1
  45. holidays/countries/puerto_rico.py +6 -2
  46. holidays/countries/saudi_arabia.py +6 -2
  47. holidays/countries/singapore.py +7 -2
  48. holidays/countries/spain.py +8 -2
  49. holidays/countries/sri_lanka.py +8 -2
  50. holidays/countries/taiwan.py +226 -29
  51. holidays/countries/tanzania.py +8 -2
  52. holidays/countries/timor_leste.py +21 -2
  53. holidays/countries/tunisia.py +6 -2
  54. holidays/countries/turkey.py +8 -2
  55. holidays/countries/united_arab_emirates.py +8 -2
  56. holidays/countries/united_states.py +84 -35
  57. holidays/countries/united_states_minor_outlying_islands.py +6 -2
  58. holidays/countries/united_states_virgin_islands.py +6 -2
  59. holidays/countries/uzbekistan.py +8 -2
  60. holidays/groups/__init__.py +1 -0
  61. holidays/groups/balinese_saka.py +45 -0
  62. holidays/groups/chinese.py +68 -3
  63. holidays/groups/hindu.py +255 -0
  64. holidays/groups/islamic.py +5 -2
  65. holidays/holiday_base.py +44 -29
  66. holidays/locale/de/LC_MESSAGES/PL.mo +0 -0
  67. holidays/locale/en_HK/LC_MESSAGES/HK.mo +0 -0
  68. holidays/locale/en_IN/LC_MESSAGES/IN.mo +0 -0
  69. holidays/locale/en_MO/LC_MESSAGES/MO.mo +0 -0
  70. holidays/locale/en_US/LC_MESSAGES/HK.mo +0 -0
  71. holidays/locale/en_US/LC_MESSAGES/IN.mo +0 -0
  72. holidays/locale/en_US/LC_MESSAGES/MO.mo +0 -0
  73. holidays/locale/en_US/LC_MESSAGES/TW.mo +0 -0
  74. holidays/locale/hi/LC_MESSAGES/IN.mo +0 -0
  75. holidays/locale/pt_MO/LC_MESSAGES/MO.mo +0 -0
  76. holidays/locale/th/LC_MESSAGES/HK.mo +0 -0
  77. holidays/locale/th/LC_MESSAGES/MO.mo +0 -0
  78. holidays/locale/th/LC_MESSAGES/TW.mo +0 -0
  79. holidays/locale/zh_CN/LC_MESSAGES/HK.mo +0 -0
  80. holidays/locale/zh_CN/LC_MESSAGES/MO.mo +0 -0
  81. holidays/locale/zh_CN/LC_MESSAGES/TW.mo +0 -0
  82. holidays/locale/zh_HK/LC_MESSAGES/HK.mo +0 -0
  83. holidays/locale/zh_MO/LC_MESSAGES/MO.mo +0 -0
  84. holidays/locale/zh_TW/LC_MESSAGES/TW.mo +0 -0
  85. holidays/registry.py +1 -0
  86. holidays/version.py +1 -1
  87. {holidays-0.68.dist-info → holidays-0.69.dist-info}/AUTHORS +1 -0
  88. {holidays-0.68.dist-info → holidays-0.69.dist-info}/METADATA +20 -15
  89. {holidays-0.68.dist-info → holidays-0.69.dist-info}/RECORD +92 -79
  90. {holidays-0.68.dist-info → holidays-0.69.dist-info}/WHEEL +1 -1
  91. {holidays-0.68.dist-info → holidays-0.69.dist-info}/LICENSE +0 -0
  92. {holidays-0.68.dist-info → holidays-0.69.dist-info}/top_level.txt +0 -0
holidays/constants.py CHANGED
@@ -42,6 +42,7 @@ ARMED_FORCES = "armed_forces"
42
42
  BANK = "bank"
43
43
  GOVERNMENT = "government"
44
44
  HALF_DAY = "half_day"
45
+ MANDATORY = "mandatory"
45
46
  OPTIONAL = "optional"
46
47
  PUBLIC = "public"
47
48
  SCHOOL = "school"
@@ -100,6 +100,7 @@ from .lesotho import Lesotho, LS, LSO
100
100
  from .liechtenstein import Liechtenstein, LI, LIE
101
101
  from .lithuania import Lithuania, LT, LTU
102
102
  from .luxembourg import Luxembourg, LU, LUX
103
+ from .macau import Macau, MO, MAC
103
104
  from .madagascar import Madagascar, MG, MDG
104
105
  from .malawi import Malawi, MW, MWI
105
106
  from .malaysia import Malaysia, MY, MYS
@@ -48,9 +48,15 @@ class Afghanistan(HolidayBase, InternationalHolidays, IslamicHolidays, PersianCa
48
48
  start_year = 1919
49
49
  weekend = {FRI, SAT}
50
50
 
51
- def __init__(self, *args, **kwargs):
51
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
52
+ """
53
+ :param islamic_show_estimated:
54
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
55
+ """
52
56
  InternationalHolidays.__init__(self)
53
- IslamicHolidays.__init__(self, AfghanistanIslamicHolidays)
57
+ IslamicHolidays.__init__(
58
+ self, cls=AfghanistanIslamicHolidays, show_estimated=islamic_show_estimated
59
+ )
54
60
  PersianCalendarHolidays.__init__(self)
55
61
  super().__init__(*args, **kwargs)
56
62
 
@@ -46,10 +46,16 @@ class Albania(
46
46
  # Law No. 7651 from 21.12.1992.
47
47
  start_year = 1993
48
48
 
49
- def __init__(self, *args, **kwargs):
49
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
50
+ """
51
+ :param islamic_show_estimated:
52
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
53
+ """
50
54
  ChristianHolidays.__init__(self)
51
55
  InternationalHolidays.__init__(self)
52
- IslamicHolidays.__init__(self, AlbaniaIslamicHolidays)
56
+ IslamicHolidays.__init__(
57
+ self, cls=AlbaniaIslamicHolidays, show_estimated=islamic_show_estimated
58
+ )
53
59
  StaticHolidays.__init__(self, AlbaniaStaticHolidays)
54
60
  kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_WORKDAY)
55
61
  super().__init__(*args, **kwargs)
@@ -33,9 +33,13 @@ class Algeria(HolidayBase, InternationalHolidays, IslamicHolidays):
33
33
  estimated_label = tr("(تقدير) %s")
34
34
  supported_languages = ("ar", "en_US", "fr")
35
35
 
36
- def __init__(self, *args, **kwargs):
36
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
37
+ """
38
+ :param islamic_show_estimated:
39
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
40
+ """
37
41
  InternationalHolidays.__init__(self)
38
- IslamicHolidays.__init__(self)
42
+ IslamicHolidays.__init__(self, show_estimated=islamic_show_estimated)
39
43
  super().__init__(*args, **kwargs)
40
44
 
41
45
  def _populate_public_holidays(self):
@@ -10,7 +10,7 @@
10
10
  # Website: https://github.com/vacanza/holidays
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
- from holidays.constants import PUBLIC, UNOFFICIAL
13
+ from holidays.constants import GOVERNMENT, PUBLIC, UNOFFICIAL
14
14
  from holidays.countries.united_states import US
15
15
 
16
16
 
@@ -20,13 +20,17 @@ class HolidaysAS(US):
20
20
  # https://en.wikipedia.org/wiki/ISO_3166-2:US#Subdivisions_included_in_ISO_3166-1
21
21
 
22
22
  country = "AS"
23
- supported_categories = (PUBLIC, UNOFFICIAL)
23
+ supported_categories = (GOVERNMENT, PUBLIC, UNOFFICIAL)
24
24
  subdivisions = () # Override US subdivisions.
25
25
 
26
26
  def _populate_public_holidays(self) -> None:
27
27
  self.subdiv = "AS"
28
28
  super()._populate_public_holidays()
29
29
 
30
+ def _populate_government_holidays(self) -> None:
31
+ self.subdiv = "AS"
32
+ super()._populate_government_holidays()
33
+
30
34
  def _populate_unofficial_holidays(self) -> None:
31
35
  self.subdiv = "AS"
32
36
  super()._populate_unofficial_holidays()
@@ -44,9 +44,15 @@ class Azerbaijan(ObservedHolidayBase, InternationalHolidays, IslamicHolidays, St
44
44
  supported_languages = ("az", "en_US", "uk")
45
45
  start_year = 1990
46
46
 
47
- def __init__(self, *args, **kwargs):
47
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
48
+ """
49
+ :param islamic_show_estimated:
50
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
51
+ """
48
52
  InternationalHolidays.__init__(self)
49
- IslamicHolidays.__init__(self, AzerbaijanIslamicHolidays)
53
+ IslamicHolidays.__init__(
54
+ self, cls=AzerbaijanIslamicHolidays, show_estimated=islamic_show_estimated
55
+ )
50
56
  StaticHolidays.__init__(self, AzerbaijanStaticHolidays)
51
57
  kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_WORKDAY)
52
58
  kwargs.setdefault("observed_since", 2006)
@@ -34,9 +34,15 @@ class Bahrain(HolidayBase, InternationalHolidays, IslamicHolidays):
34
34
  supported_languages = ("ar", "en_US")
35
35
  weekend = {FRI, SAT}
36
36
 
37
- def __init__(self, *args, **kwargs):
37
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
38
+ """
39
+ :param islamic_show_estimated:
40
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
41
+ """
38
42
  InternationalHolidays.__init__(self)
39
- IslamicHolidays.__init__(self, cls=BahrainIslamicHolidays)
43
+ IslamicHolidays.__init__(
44
+ self, cls=BahrainIslamicHolidays, show_estimated=islamic_show_estimated
45
+ )
40
46
  super().__init__(*args, **kwargs)
41
47
 
42
48
  def _populate_public_holidays(self):
@@ -73,10 +73,16 @@ class BosniaAndHerzegovina(
73
73
  "RS": "SRP",
74
74
  }
75
75
 
76
- def __init__(self, *args, **kwargs):
76
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
77
+ """
78
+ :param islamic_show_estimated:
79
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
80
+ """
77
81
  ChristianHolidays.__init__(self, JULIAN_CALENDAR)
78
82
  InternationalHolidays.__init__(self)
79
- IslamicHolidays.__init__(self, cls=BosniaAndHerzegovinaIslamicHolidays)
83
+ IslamicHolidays.__init__(
84
+ self, cls=BosniaAndHerzegovinaIslamicHolidays, show_estimated=islamic_show_estimated
85
+ )
80
86
  kwargs.setdefault("observed_rule", SUN_TO_NEXT_MON)
81
87
  super().__init__(*args, **kwargs)
82
88
 
@@ -130,11 +130,17 @@ class Brunei(
130
130
  # Available post-Independence from 1984 afterwards
131
131
  start_year = 1984
132
132
 
133
- def __init__(self, *args, **kwargs):
133
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
134
+ """
135
+ :param islamic_show_estimated:
136
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
137
+ """
134
138
  ChineseCalendarHolidays.__init__(self)
135
139
  ChristianHolidays.__init__(self)
136
140
  InternationalHolidays.__init__(self)
137
- IslamicHolidays.__init__(self, cls=BruneiIslamicHolidays)
141
+ IslamicHolidays.__init__(
142
+ self, cls=BruneiIslamicHolidays, show_estimated=islamic_show_estimated
143
+ )
138
144
  StaticHolidays.__init__(self, cls=BruneiStaticHolidays)
139
145
  kwargs.setdefault("observed_rule", FRI_SUN_TO_NEXT_SAT_MON)
140
146
  super().__init__(*args, **kwargs)
@@ -28,10 +28,16 @@ class BurkinaFaso(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
28
28
  # gained independence from France.
29
29
  start_year = 1961
30
30
 
31
- def __init__(self, *args, **kwargs):
31
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
32
+ """
33
+ :param islamic_show_estimated:
34
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
35
+ """
32
36
  ChristianHolidays.__init__(self)
33
37
  InternationalHolidays.__init__(self)
34
- IslamicHolidays.__init__(self, cls=BurkinaFasoIslamicHolidays)
38
+ IslamicHolidays.__init__(
39
+ self, cls=BurkinaFasoIslamicHolidays, show_estimated=islamic_show_estimated
40
+ )
35
41
  kwargs.setdefault("observed_rule", SUN_TO_NEXT_MON)
36
42
  super().__init__(*args, **kwargs)
37
43
 
@@ -30,10 +30,14 @@ class Burundi(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Isl
30
30
  observed_label = "%s (observed)"
31
31
  start_year = 1962
32
32
 
33
- def __init__(self, *args, **kwargs):
33
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
34
+ """
35
+ :param islamic_show_estimated:
36
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
37
+ """
34
38
  ChristianHolidays.__init__(self)
35
39
  InternationalHolidays.__init__(self)
36
- IslamicHolidays.__init__(self)
40
+ IslamicHolidays.__init__(self, show_estimated=islamic_show_estimated)
37
41
  kwargs.setdefault("observed_rule", SUN_TO_NEXT_MON)
38
42
  super().__init__(*args, **kwargs)
39
43
 
@@ -36,10 +36,16 @@ class Cameroon(
36
36
  # On 1 January 1960, French Cameroun gained independence from France.
37
37
  start_year = 1960
38
38
 
39
- def __init__(self, *args, **kwargs):
39
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
40
+ """
41
+ :param islamic_show_estimated:
42
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
43
+ """
40
44
  ChristianHolidays.__init__(self)
41
45
  InternationalHolidays.__init__(self)
42
- IslamicHolidays.__init__(self, cls=CameroonIslamicHolidays)
46
+ IslamicHolidays.__init__(
47
+ self, cls=CameroonIslamicHolidays, show_estimated=islamic_show_estimated
48
+ )
43
49
  StaticHolidays.__init__(self, cls=CameroonStaticHolidays)
44
50
  kwargs.setdefault("observed_rule", SUN_TO_NEXT_WORKDAY)
45
51
  super().__init__(*args, **kwargs)
@@ -35,10 +35,16 @@ class Chad(
35
35
  # On 11 August 1960, Chad gained independence from France.
36
36
  start_year = 1961
37
37
 
38
- def __init__(self, *args, **kwargs):
38
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
39
+ """
40
+ :param islamic_show_estimated:
41
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
42
+ """
39
43
  ChristianHolidays.__init__(self)
40
44
  InternationalHolidays.__init__(self)
41
- IslamicHolidays.__init__(self, cls=ChadIslamicHolidays)
45
+ IslamicHolidays.__init__(
46
+ self, cls=ChadIslamicHolidays, show_estimated=islamic_show_estimated
47
+ )
42
48
  StaticHolidays.__init__(self, ChadStaticHolidays)
43
49
  kwargs.setdefault("observed_rule", SUN_TO_NEXT_MON)
44
50
  super().__init__(*args, **kwargs)
@@ -27,9 +27,13 @@ class Djibouti(HolidayBase, ChristianHolidays, IslamicHolidays, InternationalHol
27
27
  # On 27 June 1977, Djibouti gained independence from France.
28
28
  start_year = 1978
29
29
 
30
- def __init__(self, *args, **kwargs):
30
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
31
+ """
32
+ :param islamic_show_estimated:
33
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
34
+ """
31
35
  ChristianHolidays.__init__(self)
32
- IslamicHolidays.__init__(self)
36
+ IslamicHolidays.__init__(self, show_estimated=islamic_show_estimated)
33
37
  InternationalHolidays.__init__(self)
34
38
  super().__init__(*args, **kwargs)
35
39
 
@@ -35,10 +35,14 @@ class Egypt(HolidayBase, ChristianHolidays, IslamicHolidays, InternationalHolida
35
35
  supported_languages = ("ar", "en_US")
36
36
  weekend = {FRI, SAT}
37
37
 
38
- def __init__(self, *args, **kwargs):
38
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
39
+ """
40
+ :param islamic_show_estimated:
41
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
42
+ """
39
43
  ChristianHolidays.__init__(self, JULIAN_CALENDAR)
40
44
  InternationalHolidays.__init__(self)
41
- IslamicHolidays.__init__(self)
45
+ IslamicHolidays.__init__(self, show_estimated=islamic_show_estimated)
42
46
  super().__init__(*args, **kwargs)
43
47
 
44
48
  def _populate_public_holidays(self):
@@ -43,10 +43,16 @@ class Ethiopia(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHol
43
43
  """
44
44
  return isleap(self._year + 1)
45
45
 
46
- def __init__(self, *args, **kwargs):
46
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
47
+ """
48
+ :param islamic_show_estimated:
49
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
50
+ """
47
51
  ChristianHolidays.__init__(self, JULIAN_CALENDAR)
48
52
  InternationalHolidays.__init__(self)
49
- IslamicHolidays.__init__(self, EthiopiaIslamicHolidays)
53
+ IslamicHolidays.__init__(
54
+ self, cls=EthiopiaIslamicHolidays, show_estimated=islamic_show_estimated
55
+ )
50
56
  super().__init__(*args, **kwargs)
51
57
 
52
58
  def _populate_public_holidays(self):
@@ -29,10 +29,16 @@ class Gabon(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolida
29
29
  # On 17 August 1960, Gabon gained independence from France.
30
30
  start_year = 1961
31
31
 
32
- def __init__(self, *args, **kwargs) -> None:
32
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
33
+ """
34
+ :param islamic_show_estimated:
35
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
36
+ """
33
37
  ChristianHolidays.__init__(self)
34
38
  InternationalHolidays.__init__(self)
35
- IslamicHolidays.__init__(self, cls=GabonIslamicHolidays)
39
+ IslamicHolidays.__init__(
40
+ self, cls=GabonIslamicHolidays, show_estimated=islamic_show_estimated
41
+ )
36
42
  super().__init__(*args, **kwargs)
37
43
 
38
44
  def _populate_public_holidays(self):
@@ -30,10 +30,14 @@ class Ghana(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Islam
30
30
  observed_estimated_label = "%s (observed, estimated)"
31
31
  start_year = 1957
32
32
 
33
- def __init__(self, *args, **kwargs):
33
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
34
+ """
35
+ :param islamic_show_estimated:
36
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
37
+ """
34
38
  ChristianHolidays.__init__(self)
35
39
  InternationalHolidays.__init__(self)
36
- IslamicHolidays.__init__(self)
40
+ IslamicHolidays.__init__(self, show_estimated=islamic_show_estimated)
37
41
  kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_MON)
38
42
  super().__init__(*args, **kwargs)
39
43
 
@@ -10,7 +10,7 @@
10
10
  # Website: https://github.com/vacanza/holidays
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
- from holidays.constants import PUBLIC, UNOFFICIAL
13
+ from holidays.constants import GOVERNMENT, PUBLIC, UNOFFICIAL
14
14
  from holidays.countries.united_states import US
15
15
 
16
16
 
@@ -20,13 +20,17 @@ class HolidaysGU(US):
20
20
  # https://en.wikipedia.org/wiki/ISO_3166-2:US#Subdivisions_included_in_ISO_3166-1
21
21
 
22
22
  country = "GU"
23
- supported_categories = (PUBLIC, UNOFFICIAL)
23
+ supported_categories = (GOVERNMENT, PUBLIC, UNOFFICIAL)
24
24
  subdivisions = () # Override US subdivisions.
25
25
 
26
26
  def _populate_public_holidays(self) -> None:
27
27
  self.subdiv = "GU"
28
28
  super()._populate_public_holidays()
29
29
 
30
+ def _populate_government_holidays(self) -> None:
31
+ self.subdiv = "GU"
32
+ super()._populate_government_holidays()
33
+
30
34
  def _populate_unofficial_holidays(self) -> None:
31
35
  self.subdiv = "GU"
32
36
  super()._populate_unofficial_holidays()
@@ -86,24 +86,24 @@ class HongKong(
86
86
  super().__init__(*args, **kwargs)
87
87
 
88
88
  def _add_mid_autumn(self) -> date:
89
- # Chinese Mid-Autumn Festival.
89
+ # Mid-Autumn Festival.
90
90
 
91
91
  mid_autumn_date = self._mid_autumn_festival
92
92
  if self._year >= 1968:
93
93
  mid_autumn_date = _timedelta(mid_autumn_date, +1)
94
- # The day following the Chinese Mid-Autumn Festival.
94
+ # The Day following Mid-Autumn Festival.
95
95
  name = tr("中秋節翌日")
96
- # The second day following the Chinese Mid-Autumn Festival.
96
+ # The Second Day following Mid-Autumn Festival.
97
97
  second_name = tr("中秋節後第二日")
98
98
  else:
99
- # Chinese Mid-Autumn Festival.
99
+ # Mid-Autumn Festival.
100
100
  name = tr("中秋節")
101
- # The day following the Chinese Mid-Autumn Festival.
101
+ # The Day following Mid-Autumn Festival.
102
102
  second_name = tr("中秋節翌日")
103
103
 
104
104
  if self._is_sunday(mid_autumn_date):
105
105
  if 1983 <= self._year <= 2010:
106
- # Chinese Mid-Autumn Festival.
106
+ # Mid-Autumn Festival.
107
107
  self._add_holiday(tr("中秋節"), _timedelta(mid_autumn_date, -1))
108
108
  else:
109
109
  self._add_holiday(second_name, _timedelta(mid_autumn_date, +1))
@@ -112,15 +112,15 @@ class HongKong(
112
112
  return mid_autumn_date
113
113
 
114
114
  def _add_lunar_new_year(self, day_three_start_year: int):
115
- # Lunar New Year's Day.
115
+ # Chinese New Year.
116
116
  name = tr("農曆年初一")
117
- # The day preceding Lunar New Year's Day.
117
+ # Chinese New Year's Eve.
118
118
  preceding_day_lunar = tr("農曆年初一的前一日")
119
- # The second day of Lunar New Year.
119
+ # The second day of Chinese New Year.
120
120
  second_day_lunar = tr("農曆年初二")
121
- # The third day of Lunar New Year.
121
+ # The third day of Chinese New Year.
122
122
  third_day_lunar = tr("農曆年初三")
123
- # The fourth day of Lunar New Year.
123
+ # The fourth day of Chinese New Year.
124
124
  fourth_day_lunar = tr("農曆年初四")
125
125
  dt_lunar_new_year = self._chinese_new_year
126
126
  if self._year >= 1983:
@@ -156,7 +156,7 @@ class HongKong(
156
156
  return None
157
157
 
158
158
  if self._year >= 1977:
159
- # The first day of January.
159
+ # New Year's Day.
160
160
  self._add_observed(self._add_new_years_day(tr("一月一日")))
161
161
 
162
162
  self._add_lunar_new_year(day_three_start_year=1977)
@@ -173,28 +173,28 @@ class HongKong(
173
173
  # Easter Monday.
174
174
  self._add_easter_monday(tr("復活節星期一"))
175
175
 
176
- # Ching Ming Festival.
176
+ # Tomb-Sweeping Day.
177
177
  self._add_observed(self._add_qingming_festival(tr("清明節")))
178
178
 
179
179
  if self._year >= 2022:
180
- # The Birthday of the Buddha.
180
+ # The Buddha's Birthday.
181
181
  self._add_observed(self._add_chinese_birthday_of_buddha(tr("佛誕")))
182
182
 
183
183
  if self._year >= 1999:
184
184
  # Labor Day.
185
185
  self._add_observed(self._add_labor_day(tr("勞動節")))
186
186
 
187
- # Tuen Ng Festival.
187
+ # Dragon Boat Festival.
188
188
  self._add_observed(self._add_dragon_boat_festival(tr("端午節")))
189
189
 
190
190
  if self._year >= 1997:
191
- # Hong Kong Special Administrative Region Establishment Day.
191
+ # Hong Kong S.A.R. Establishment Day.
192
192
  self._add_observed(self._add_holiday_jul_1(tr("香港特別行政區成立紀念日")))
193
193
 
194
194
  mid_autumn_date = self._add_mid_autumn()
195
195
 
196
196
  if self._year >= 1977:
197
- # Chung Yeung Festival.
197
+ # Double Ninth Festival.
198
198
  dt_double_ninth = self._add_double_ninth_festival(tr("重陽節"))
199
199
  self._add_observed(dt_double_ninth)
200
200
 
@@ -211,8 +211,8 @@ class HongKong(
211
211
  )
212
212
 
213
213
  if WINTER_SOLSTICE in self.preferred_discretionary_holidays:
214
- # Chinese Winter Solstice Festival.
215
- self._add_observed(self._add_holiday(tr("冬節"), self._winter_solstice_date))
214
+ # Winter Solstice.
215
+ self._add_observed(self._add_dongzhi_festival(tr("冬節")))
216
216
 
217
217
  if self._year >= 2024:
218
218
  # The first weekday after Christmas Day.
@@ -226,21 +226,21 @@ class HongKong(
226
226
  # General Holidays.
227
227
 
228
228
  if self._is_sunday(JAN, 1):
229
- # The day following the first day of January.
229
+ # The day following New Year's Day.
230
230
  self._add_new_years_day_two(tr("一月一日翌日"))
231
231
  else:
232
- # The first day of January.
232
+ # New Year's Day.
233
233
  self._add_new_years_day(tr("一月一日"))
234
234
 
235
235
  self._add_lunar_new_year(day_three_start_year=1968)
236
236
 
237
237
  if self._year >= 1968:
238
- dt_qingming = self._qingming_date
238
+ dt_qingming = self._qingming_festival
239
239
  if self._is_sunday(dt_qingming) or dt_qingming == _timedelta(self._easter_sunday, +1):
240
- # The day following Ching Ming Festival.
240
+ # The day following Tomb-Sweeping Day.
241
241
  self._add_holiday(tr("清明節翌日"), _timedelta(dt_qingming, +1))
242
242
  else:
243
- # Ching Ming Festival.
243
+ # Tomb-Sweeping Day.
244
244
  self._add_qingming_festival(tr("清明節"))
245
245
 
246
246
  # Good Friday.
@@ -257,12 +257,12 @@ class HongKong(
257
257
  self._add_easter_monday(tr("復活節星期一"))
258
258
 
259
259
  if self._year >= 1999:
260
- dt_birthday_of_buddha = self._chinese_calendar.buddha_birthday_date(self._year)[0]
260
+ dt_birthday_of_buddha = self._chinese_birthday_of_buddha
261
261
  if self._is_sunday(dt_birthday_of_buddha):
262
- # The day following the Birthday of the Buddha.
262
+ # The day following the Buddha's Birthday.
263
263
  self._add_holiday(tr("佛誕翌日"), _timedelta(dt_birthday_of_buddha, +1))
264
264
  else:
265
- # The Birthday of the Buddha.
265
+ # The Buddha's Birthday.
266
266
  self._add_chinese_birthday_of_buddha(tr("佛誕"))
267
267
 
268
268
  if self._year >= 1999:
@@ -274,31 +274,31 @@ class HongKong(
274
274
  self._add_labor_day(tr("勞動節"))
275
275
 
276
276
  if self._year >= 1968:
277
- dt_dragon_boat = self._chinese_calendar.dragon_boat_date(self._year)[0]
277
+ dt_dragon_boat = self._dragon_boat_festival
278
278
  if self._is_sunday(dt_dragon_boat):
279
- # The day following Tuen Ng Festival.
279
+ # The day following Dragon Boat Festival.
280
280
  self._add_holiday(tr("端午節翌日"), _timedelta(dt_dragon_boat, +1))
281
281
  else:
282
- # Tuen Ng Festival.
282
+ # Dragon Boat Festival.
283
283
  self._add_dragon_boat_festival(tr("端午節"))
284
284
 
285
285
  if self._year >= 1997:
286
286
  if self._is_sunday(JUL, 1):
287
- # The day following Hong Kong Special Administrative Region Establishment Day.
287
+ # The day following Hong Kong S.A.R. Establishment Day.
288
288
  self._add_holiday_jul_2(tr("香港特別行政區成立紀念日翌日"))
289
289
  else:
290
- # Hong Kong Special Administrative Region Establishment Day.
290
+ # Hong Kong S.A.R. Establishment Day.
291
291
  self._add_holiday_jul_1(tr("香港特別行政區成立紀念日"))
292
292
 
293
293
  mid_autumn_date = self._add_mid_autumn()
294
294
 
295
295
  if self._year >= 1968:
296
- dt_double_ninth = self._chinese_calendar.double_ninth_date(self._year)[0]
296
+ dt_double_ninth = self._double_ninth_festival
297
297
  if self._is_sunday(dt_double_ninth):
298
- # The day following Chung Yeung Festival.
298
+ # The day following Double Ninth Festival.
299
299
  self._add_holiday(tr("重陽節翌日"), _timedelta(dt_double_ninth, +1))
300
300
  else:
301
- # Chung Yeung Festival.
301
+ # Double Ninth Festival.
302
302
  self._add_double_ninth_festival(tr("重陽節"))
303
303
 
304
304
  if self._year >= 1997:
@@ -367,20 +367,6 @@ class HongKong(
367
367
  else:
368
368
  self._add_holiday_aug_30(name)
369
369
 
370
- @property
371
- def _winter_solstice_date(self) -> tuple[int, int]:
372
- # This approximation is reliable for 1952-2099 years.
373
- if (
374
- (self._year % 4 == 0 and self._year >= 1988)
375
- or (self._year % 4 == 1 and self._year >= 2021)
376
- or (self._year % 4 == 2 and self._year >= 2058)
377
- or (self._year % 4 == 3 and self._year >= 2091)
378
- ):
379
- day = 21
380
- else:
381
- day = 22
382
- return DEC, day
383
-
384
370
 
385
371
  class HK(HongKong):
386
372
  pass
@@ -400,11 +386,11 @@ class HongKongStaticHolidays:
400
386
  # Queen's Birthday.
401
387
  queen_birthday = tr("英女皇壽辰")
402
388
 
403
- # The day following Hong Kong Special Administrative Region Establishment Day.
389
+ # The day following Hong Kong S.A.R. Establishment Day.
404
390
  day_following_hksar_establishment_day = tr("香港特別行政區成立紀念日翌日")
405
391
 
406
- # The 70th anniversary day of the victory of
407
- # the Chinese people's war of resistance against Japanese aggression.
392
+ # 70th Anniversary of the Victory of the Chinese People's War of Resistance against
393
+ # Japanese Aggression and the World Anti-Fascist War.
408
394
  victory_70th_anniversary = tr("中國人民抗日戰爭勝利70周年紀念日")
409
395
 
410
396
  # Sino-Japanese War Victory Day.