holidays 0.68__py3-none-any.whl → 0.70__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 (254) hide show
  1. holidays/__init__.py +1 -1
  2. holidays/calendars/__init__.py +2 -1
  3. holidays/calendars/balinese_saka.py +112 -0
  4. holidays/calendars/buddhist.py +1 -1
  5. holidays/calendars/chinese.py +1 -1
  6. holidays/calendars/custom.py +1 -1
  7. holidays/calendars/gregorian.py +1 -1
  8. holidays/calendars/hebrew.py +1 -1
  9. holidays/calendars/hindu.py +866 -2
  10. holidays/calendars/islamic.py +161 -1
  11. holidays/calendars/julian.py +1 -1
  12. holidays/calendars/julian_revised.py +1 -1
  13. holidays/calendars/persian.py +1 -1
  14. holidays/calendars/sinhala.py +1 -1
  15. holidays/calendars/thai.py +309 -257
  16. holidays/constants.py +3 -1
  17. holidays/countries/__init__.py +7 -1
  18. holidays/countries/afghanistan.py +17 -7
  19. holidays/countries/albania.py +16 -7
  20. holidays/countries/algeria.py +14 -10
  21. holidays/countries/american_samoa.py +12 -6
  22. holidays/countries/andorra.py +5 -4
  23. holidays/countries/angola.py +15 -14
  24. holidays/countries/antigua_and_barbuda.py +145 -0
  25. holidays/countries/argentina.py +787 -169
  26. holidays/countries/armenia.py +5 -6
  27. holidays/countries/aruba.py +11 -9
  28. holidays/countries/australia.py +21 -20
  29. holidays/countries/austria.py +3 -1
  30. holidays/countries/azerbaijan.py +30 -19
  31. holidays/countries/bahamas.py +13 -11
  32. holidays/countries/bahrain.py +14 -7
  33. holidays/countries/bangladesh.py +5 -4
  34. holidays/countries/barbados.py +11 -9
  35. holidays/countries/belarus.py +15 -15
  36. holidays/countries/belgium.py +8 -6
  37. holidays/countries/belize.py +7 -6
  38. holidays/countries/bolivia.py +12 -11
  39. holidays/countries/bosnia_and_herzegovina.py +21 -11
  40. holidays/countries/botswana.py +8 -6
  41. holidays/countries/brazil.py +8 -7
  42. holidays/countries/brunei.py +56 -62
  43. holidays/countries/bulgaria.py +9 -10
  44. holidays/countries/burkina_faso.py +14 -5
  45. holidays/countries/burundi.py +17 -12
  46. holidays/countries/cambodia.py +15 -24
  47. holidays/countries/cameroon.py +16 -7
  48. holidays/countries/canada.py +13 -12
  49. holidays/countries/chad.py +15 -6
  50. holidays/countries/chile.py +29 -28
  51. holidays/countries/china.py +39 -38
  52. holidays/countries/colombia.py +15 -20
  53. holidays/countries/congo.py +6 -7
  54. holidays/countries/costa_rica.py +11 -10
  55. holidays/countries/croatia.py +8 -5
  56. holidays/countries/cuba.py +30 -27
  57. holidays/countries/curacao.py +6 -4
  58. holidays/countries/cyprus.py +4 -5
  59. holidays/countries/czechia.py +7 -6
  60. holidays/countries/denmark.py +5 -6
  61. holidays/countries/djibouti.py +11 -3
  62. holidays/countries/dominica.py +18 -16
  63. holidays/countries/dominican_republic.py +6 -4
  64. holidays/countries/ecuador.py +5 -4
  65. holidays/countries/egypt.py +10 -11
  66. holidays/countries/el_salvador.py +6 -5
  67. holidays/countries/estonia.py +3 -1
  68. holidays/countries/eswatini.py +6 -4
  69. holidays/countries/ethiopia.py +26 -11
  70. holidays/countries/fiji.py +183 -0
  71. holidays/countries/finland.py +11 -10
  72. holidays/countries/france.py +6 -9
  73. holidays/countries/gabon.py +17 -8
  74. holidays/countries/georgia.py +7 -7
  75. holidays/countries/germany.py +11 -11
  76. holidays/countries/ghana.py +14 -6
  77. holidays/countries/greece.py +4 -5
  78. holidays/countries/greenland.py +5 -6
  79. holidays/countries/guam.py +12 -6
  80. holidays/countries/guatemala.py +7 -9
  81. holidays/countries/guernsey.py +37 -34
  82. holidays/countries/guinea.py +182 -0
  83. holidays/countries/haiti.py +6 -5
  84. holidays/countries/honduras.py +8 -4
  85. holidays/countries/hongkong.py +49 -60
  86. holidays/countries/hungary.py +26 -23
  87. holidays/countries/iceland.py +5 -4
  88. holidays/countries/india.py +494 -174
  89. holidays/countries/indonesia.py +68 -108
  90. holidays/countries/iran.py +18 -9
  91. holidays/countries/ireland.py +5 -4
  92. holidays/countries/isle_of_man.py +2 -2
  93. holidays/countries/israel.py +4 -5
  94. holidays/countries/italy.py +5 -4
  95. holidays/countries/ivory_coast.py +156 -0
  96. holidays/countries/jamaica.py +6 -4
  97. holidays/countries/japan.py +5 -5
  98. holidays/countries/jersey.py +29 -26
  99. holidays/countries/jordan.py +13 -6
  100. holidays/countries/kazakhstan.py +72 -51
  101. holidays/countries/kenya.py +28 -18
  102. holidays/countries/kuwait.py +14 -7
  103. holidays/countries/kyrgyzstan.py +11 -6
  104. holidays/countries/laos.py +21 -29
  105. holidays/countries/latvia.py +7 -5
  106. holidays/countries/lesotho.py +6 -5
  107. holidays/countries/liechtenstein.py +5 -5
  108. holidays/countries/lithuania.py +4 -5
  109. holidays/countries/luxembourg.py +5 -3
  110. holidays/countries/macau.py +480 -0
  111. holidays/countries/madagascar.py +5 -4
  112. holidays/countries/malawi.py +6 -4
  113. holidays/countries/malaysia.py +30 -18
  114. holidays/countries/maldives.py +14 -7
  115. holidays/countries/malta.py +10 -19
  116. holidays/countries/marshall_islands.py +6 -4
  117. holidays/countries/mauritania.py +13 -6
  118. holidays/countries/mexico.py +8 -7
  119. holidays/countries/moldova.py +6 -4
  120. holidays/countries/monaco.py +6 -4
  121. holidays/countries/montenegro.py +16 -7
  122. holidays/countries/morocco.py +13 -8
  123. holidays/countries/mozambique.py +3 -1
  124. holidays/countries/namibia.py +7 -5
  125. holidays/countries/netherlands.py +6 -6
  126. holidays/countries/new_zealand.py +3 -1
  127. holidays/countries/nicaragua.py +6 -5
  128. holidays/countries/nigeria.py +13 -5
  129. holidays/countries/north_macedonia.py +13 -5
  130. holidays/countries/northern_mariana_islands.py +12 -6
  131. holidays/countries/norway.py +15 -15
  132. holidays/countries/pakistan.py +48 -18
  133. holidays/countries/palau.py +13 -11
  134. holidays/countries/panama.py +9 -8
  135. holidays/countries/papua_new_guinea.py +25 -21
  136. holidays/countries/paraguay.py +10 -9
  137. holidays/countries/peru.py +4 -5
  138. holidays/countries/philippines.py +32 -18
  139. holidays/countries/poland.py +7 -6
  140. holidays/countries/portugal.py +13 -15
  141. holidays/countries/puerto_rico.py +12 -6
  142. holidays/countries/qatar.py +172 -0
  143. holidays/countries/romania.py +6 -4
  144. holidays/countries/russia.py +6 -4
  145. holidays/countries/saint_kitts_and_nevis.py +24 -22
  146. holidays/countries/saint_lucia.py +8 -7
  147. holidays/countries/samoa.py +7 -6
  148. holidays/countries/san_marino.py +4 -3
  149. holidays/countries/saudi_arabia.py +15 -15
  150. holidays/countries/serbia.py +3 -4
  151. holidays/countries/seychelles.py +22 -26
  152. holidays/countries/singapore.py +33 -38
  153. holidays/countries/slovakia.py +6 -5
  154. holidays/countries/slovenia.py +7 -6
  155. holidays/countries/south_africa.py +8 -6
  156. holidays/countries/south_korea.py +25 -32
  157. holidays/countries/spain.py +31 -24
  158. holidays/countries/sri_lanka.py +52 -42
  159. holidays/countries/sweden.py +20 -19
  160. holidays/countries/switzerland.py +6 -5
  161. holidays/countries/taiwan.py +230 -31
  162. holidays/countries/tanzania.py +34 -27
  163. holidays/countries/thailand.py +134 -142
  164. holidays/countries/timor_leste.py +38 -17
  165. holidays/countries/tonga.py +46 -42
  166. holidays/countries/tunisia.py +9 -3
  167. holidays/countries/turkey.py +17 -9
  168. holidays/countries/tuvalu.py +12 -11
  169. holidays/countries/ukraine.py +54 -54
  170. holidays/countries/united_arab_emirates.py +43 -30
  171. holidays/countries/united_kingdom.py +7 -6
  172. holidays/countries/united_states.py +130 -86
  173. holidays/countries/united_states_minor_outlying_islands.py +12 -6
  174. holidays/countries/united_states_virgin_islands.py +12 -6
  175. holidays/countries/uruguay.py +10 -9
  176. holidays/countries/uzbekistan.py +16 -7
  177. holidays/countries/vanuatu.py +7 -5
  178. holidays/countries/vatican_city.py +16 -15
  179. holidays/countries/venezuela.py +11 -14
  180. holidays/countries/vietnam.py +15 -11
  181. holidays/countries/zambia.py +8 -6
  182. holidays/countries/zimbabwe.py +6 -4
  183. holidays/deprecations/v1_incompatibility.py +1 -1
  184. holidays/financial/__init__.py +1 -1
  185. holidays/financial/brasil_bolsa_balcao.py +14 -13
  186. holidays/financial/european_central_bank.py +7 -6
  187. holidays/financial/ice_futures_europe.py +7 -6
  188. holidays/financial/ny_stock_exchange.py +13 -10
  189. holidays/groups/__init__.py +2 -1
  190. holidays/groups/balinese_saka.py +45 -0
  191. holidays/groups/buddhist.py +1 -1
  192. holidays/groups/chinese.py +69 -4
  193. holidays/groups/christian.py +1 -1
  194. holidays/groups/custom.py +1 -1
  195. holidays/groups/eastern.py +1 -1
  196. holidays/groups/hebrew.py +1 -1
  197. holidays/groups/hindu.py +256 -1
  198. holidays/groups/international.py +1 -1
  199. holidays/groups/islamic.py +17 -3
  200. holidays/groups/persian.py +1 -1
  201. holidays/groups/sinhala.py +1 -1
  202. holidays/groups/thai.py +1 -7
  203. holidays/helpers.py +1 -1
  204. holidays/holiday_base.py +410 -273
  205. holidays/ical.py +228 -0
  206. holidays/locale/ar_QA/LC_MESSAGES/QA.mo +0 -0
  207. holidays/locale/de/LC_MESSAGES/PL.mo +0 -0
  208. holidays/locale/en_CI/LC_MESSAGES/CI.mo +0 -0
  209. holidays/locale/en_HK/LC_MESSAGES/HK.mo +0 -0
  210. holidays/locale/en_IN/LC_MESSAGES/IN.mo +0 -0
  211. holidays/locale/en_MO/LC_MESSAGES/MO.mo +0 -0
  212. holidays/locale/en_PK/LC_MESSAGES/PK.mo +0 -0
  213. holidays/locale/en_TL/LC_MESSAGES/TL.mo +0 -0
  214. holidays/locale/en_US/LC_MESSAGES/AR.mo +0 -0
  215. holidays/locale/en_US/LC_MESSAGES/CI.mo +0 -0
  216. holidays/locale/en_US/LC_MESSAGES/GN.mo +0 -0
  217. holidays/locale/en_US/LC_MESSAGES/HK.mo +0 -0
  218. holidays/locale/en_US/LC_MESSAGES/IN.mo +0 -0
  219. holidays/locale/en_US/LC_MESSAGES/MO.mo +0 -0
  220. holidays/locale/en_US/LC_MESSAGES/PK.mo +0 -0
  221. holidays/locale/en_US/LC_MESSAGES/QA.mo +0 -0
  222. holidays/locale/en_US/LC_MESSAGES/TL.mo +0 -0
  223. holidays/locale/en_US/LC_MESSAGES/TW.mo +0 -0
  224. holidays/locale/es/LC_MESSAGES/AR.mo +0 -0
  225. holidays/locale/fr/LC_MESSAGES/CI.mo +0 -0
  226. holidays/locale/fr/LC_MESSAGES/GN.mo +0 -0
  227. holidays/locale/hi/LC_MESSAGES/IN.mo +0 -0
  228. holidays/locale/pt_MO/LC_MESSAGES/MO.mo +0 -0
  229. holidays/locale/pt_TL/LC_MESSAGES/TL.mo +0 -0
  230. holidays/locale/tet/LC_MESSAGES/TL.mo +0 -0
  231. holidays/locale/th/LC_MESSAGES/HK.mo +0 -0
  232. holidays/locale/th/LC_MESSAGES/MO.mo +0 -0
  233. holidays/locale/th/LC_MESSAGES/TL.mo +0 -0
  234. holidays/locale/th/LC_MESSAGES/TW.mo +0 -0
  235. holidays/locale/uk/LC_MESSAGES/AR.mo +0 -0
  236. holidays/locale/ur_PK/LC_MESSAGES/PK.mo +0 -0
  237. holidays/locale/zh_CN/LC_MESSAGES/HK.mo +0 -0
  238. holidays/locale/zh_CN/LC_MESSAGES/MO.mo +0 -0
  239. holidays/locale/zh_CN/LC_MESSAGES/TW.mo +0 -0
  240. holidays/locale/zh_HK/LC_MESSAGES/HK.mo +0 -0
  241. holidays/locale/zh_MO/LC_MESSAGES/MO.mo +0 -0
  242. holidays/locale/zh_TW/LC_MESSAGES/TW.mo +0 -0
  243. holidays/mixins.py +2 -2
  244. holidays/observed_holiday_base.py +5 -2
  245. holidays/registry.py +7 -1
  246. holidays/utils.py +151 -151
  247. holidays/version.py +2 -2
  248. holidays-0.70.dist-info/METADATA +1404 -0
  249. {holidays-0.68.dist-info → holidays-0.70.dist-info}/RECORD +253 -222
  250. {holidays-0.68.dist-info → holidays-0.70.dist-info}/WHEEL +1 -1
  251. holidays-0.68.dist-info/AUTHORS → holidays-0.70.dist-info/licenses/AUTHORS.md +7 -2
  252. {holidays-0.68.dist-info → holidays-0.70.dist-info/licenses}/LICENSE +1 -1
  253. holidays-0.68.dist-info/METADATA +0 -1080
  254. {holidays-0.68.dist-info → holidays-0.70.dist-info}/top_level.txt +0 -0
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS file)
7
+ # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -19,14 +19,7 @@ from holidays.holiday_base import HolidayBase
19
19
 
20
20
 
21
21
  class Egypt(HolidayBase, ChristianHolidays, IslamicHolidays, InternationalHolidays):
22
- # Holidays here are estimates, it is common for the day to be pushed
23
- # if falls in a weekend, although not a rule that can be implemented.
24
- # The following four moving date holidays whose exact date is announced yearly
25
- # are estimated (and so denoted):
26
- # - Eid al-Fitr
27
- # - Eid al-Adha
28
- # - Arafat Day
29
- # - Prophet's Birthday
22
+ """Egypt holidays."""
30
23
 
31
24
  country = "EG"
32
25
  default_language = "ar"
@@ -35,10 +28,16 @@ class Egypt(HolidayBase, ChristianHolidays, IslamicHolidays, InternationalHolida
35
28
  supported_languages = ("ar", "en_US")
36
29
  weekend = {FRI, SAT}
37
30
 
38
- def __init__(self, *args, **kwargs):
31
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
32
+ """
33
+ Args:
34
+ islamic_show_estimated:
35
+ Whether to add "estimated" label to Islamic holidays name
36
+ if holiday date is estimated.
37
+ """
39
38
  ChristianHolidays.__init__(self, JULIAN_CALENDAR)
40
39
  InternationalHolidays.__init__(self)
41
- IslamicHolidays.__init__(self)
40
+ IslamicHolidays.__init__(self, show_estimated=islamic_show_estimated)
42
41
  super().__init__(*args, **kwargs)
43
42
 
44
43
  def _populate_public_holidays(self):
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS file)
7
+ # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -17,11 +17,12 @@ from holidays.holiday_base import HolidayBase
17
17
 
18
18
 
19
19
  class ElSalvador(HolidayBase, ChristianHolidays, InternationalHolidays):
20
- """
20
+ """El Salvador holidays.
21
+
21
22
  References:
22
- - `Labor Code 1972 <https://www.transparencia.gob.sv/institutions/gd-usulutan/documents/192280/download>`_
23
- - https://www.timeanddate.com/holidays/el-salvador
24
- - https://www.officeholidays.com/countries/el-salvador
23
+ * [Labor Code 1972](https://www.transparencia.gob.sv/institutions/gd-usulutan/documents/192280/download)
24
+ * <https://www.timeanddate.com/holidays/el-salvador>
25
+ * <https://www.officeholidays.com/countries/el-salvador>
25
26
  """
26
27
 
27
28
  country = "SV"
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS file)
7
+ # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -17,6 +17,8 @@ from holidays.holiday_base import HolidayBase
17
17
 
18
18
 
19
19
  class Estonia(HolidayBase, ChristianHolidays, InternationalHolidays):
20
+ """Estonia holidays."""
21
+
20
22
  country = "EE"
21
23
  default_language = "et"
22
24
  supported_languages = ("en_US", "et", "uk")
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS file)
7
+ # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -18,9 +18,11 @@ from holidays.observed_holiday_base import ObservedHolidayBase, SUN_TO_NEXT_MON,
18
18
 
19
19
 
20
20
  class Eswatini(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays):
21
- """
22
- https://swazilii.org/sz/legislation/act/1938/71
23
- https://www.officeholidays.com/countries/swaziland
21
+ """Eswatini holidays.
22
+
23
+ References:
24
+ * <https://swazilii.org/sz/legislation/act/1938/71>
25
+ * <https://www.officeholidays.com/countries/swaziland>
24
26
  """
25
27
 
26
28
  country = "SZ"
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS file)
7
+ # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -21,9 +21,10 @@ from holidays.holiday_base import HolidayBase
21
21
 
22
22
 
23
23
  class Ethiopia(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays):
24
- """
24
+ """Ethiopia holidays.
25
+
25
26
  References:
26
- - https://en.wikipedia.org/wiki/Public_holidays_in_Ethiopia
27
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_Ethiopia>
27
28
  """
28
29
 
29
30
  country = "ET"
@@ -34,19 +35,33 @@ class Ethiopia(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHol
34
35
  start_year = 1898
35
36
 
36
37
  def _is_leap_year(self):
38
+ """Determine if the Ethiopian calendar year is a leap year.
39
+
40
+ Ethiopian leap years generally align with Gregorian leap years until
41
+ February 2100. However, the Ethiopian calendar starts earlier (on September 11),
42
+ which affects holidays between September 11 and January 1.
43
+
44
+ To account for this shift, the method checks whether next year is a leap year
45
+ in the Gregorian calendar.
46
+
47
+ Returns:
48
+ `True` if the Ethiopian year is a leap year, `False` otherwise.
37
49
  """
38
- Ethiopian leap years are coincident with leap years in the Gregorian calendar until
39
- the end of February 2100. It starts earlier from new year of western calendar.
40
- Ethiopian leap year starts on Sep 11, so it has an effect on holidays between
41
- Sep 11 and Jan 1. Therefore, here on the following function we intentionally add 1
42
- to the leap year to offset the difference.
43
- """
50
+
44
51
  return isleap(self._year + 1)
45
52
 
46
- def __init__(self, *args, **kwargs):
53
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
54
+ """
55
+ Args:
56
+ islamic_show_estimated:
57
+ Whether to add "estimated" label to Islamic holidays name
58
+ if holiday date is estimated.
59
+ """
47
60
  ChristianHolidays.__init__(self, JULIAN_CALENDAR)
48
61
  InternationalHolidays.__init__(self)
49
- IslamicHolidays.__init__(self, EthiopiaIslamicHolidays)
62
+ IslamicHolidays.__init__(
63
+ self, cls=EthiopiaIslamicHolidays, show_estimated=islamic_show_estimated
64
+ )
50
65
  super().__init__(*args, **kwargs)
51
66
 
52
67
  def _populate_public_holidays(self):
@@ -0,0 +1,183 @@
1
+ # holidays
2
+ # --------
3
+ # A fast, efficient Python library for generating country, province and state
4
+ # specific sets of holidays on the fly. It aims to make determining whether a
5
+ # specific date is a holiday as fast and flexible as possible.
6
+ #
7
+ # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
8
+ # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
+ # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
+ # Website: https://github.com/vacanza/holidays
11
+ # License: MIT (see LICENSE file)
12
+
13
+ from holidays.calendars import _CustomHinduHolidays, _CustomIslamicHolidays
14
+ from holidays.calendars.gregorian import SEP, OCT, NOV, DEC
15
+ from holidays.constants import PUBLIC, WORKDAY
16
+ from holidays.groups import (
17
+ ChristianHolidays,
18
+ HinduCalendarHolidays,
19
+ InternationalHolidays,
20
+ IslamicHolidays,
21
+ )
22
+ from holidays.observed_holiday_base import (
23
+ ObservedHolidayBase,
24
+ SAT_SUN_TO_NEXT_MON,
25
+ SAT_SUN_TO_NEXT_MON_TUE,
26
+ ALL_TO_NEAREST_MON,
27
+ )
28
+
29
+
30
+ class Fiji(
31
+ ObservedHolidayBase,
32
+ ChristianHolidays,
33
+ HinduCalendarHolidays,
34
+ InternationalHolidays,
35
+ IslamicHolidays,
36
+ ):
37
+ """Fiji holidays.
38
+
39
+ References:
40
+ * <https://laws.gov.fj/Acts/DisplayAct/2910#>
41
+ * <https://laws.gov.fj/LawsAsMade>
42
+ * <https://www.fiji.gov.fj/About-Fiji/Public-Holidays>
43
+ * <https://www.timeanddate.com/holidays/fiji/>
44
+ * <https://en.wikipedia.org/wiki/List_of_festivals_in_Fiji>
45
+ * <https://www.rnz.co.nz/international/pacific-news/249514/new-public-holiday-for-fiji>
46
+ * <https://www.fijitimes.com.fj/constitution-day-public-holiday-removed-cabinet/>
47
+ * <https://fijivillage.com/news/National-Sports-Day-celebrated-5krs29/>
48
+ * <https://fijivillage.com/news/Cabinet-approves-Ratu-Sir-Lala-Sukuna-Day-and-Girmit-Day-and-removes-Constitution-Day-as-a-public-holiday-f48r5x/>
49
+
50
+ Official Fiji Public Holidays Calendar:
51
+ * [2016](https://www.fiji.gov.fj/Media-Center/Press-Releases/GOVERNMENT-APPROVES-2016-PUBLIC-HOLIDAYS.aspx)
52
+ * [2017](https://www.fiji.gov.fj/Media-Centre/News/GOVERNMENT-APPROVES-2017-PUBLIC-HOLIDAYS)
53
+ * [2018](https://web.archive.org/web/20180727205733/http://www.employment.gov.fj/images/Laws/Press%20Release%20-%20Government%20Approves%202018%20Public%20Holidays.pdf)
54
+ * [2019](https://web.archive.org/web/20191018023027/https://www.fiji.gov.fj/About-Fiji/Public-Holidays)
55
+ * [2020](https://web.archive.org/web/20210103183942/https://www.fiji.gov.fj/About-Fiji/Public-Holidays)
56
+ * [2021-2022](https://web.archive.org/web/20221223004409/https://www.fiji.gov.fj/About-Fiji/Public-Holidays)
57
+ * [2023](https://web.archive.org/web/20231129154609/https://www.fiji.gov.fj/About-Fiji/Public-Holidays)
58
+ * [2024](https://web.archive.org/web/20250121185434/https://www.fiji.gov.fj/About-Fiji/Public-Holidays)
59
+ * [2025](https://web.archive.org/web/20250318092311/https://www.fiji.gov.fj/About-Fiji/Public-Holidays)
60
+ """
61
+
62
+ country = "FJ"
63
+ supported_categories = (PUBLIC, WORKDAY)
64
+ # %s (estimated).
65
+ estimated_label = "%s (estimated)"
66
+ # %s (observed).
67
+ observed_label = "%s (observed)"
68
+ # %s (observed, estimated).
69
+ observed_estimated_label = "%s (observed, estimated)"
70
+ # Act No. 13 of 2015
71
+ start_year = 2016
72
+
73
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
74
+ """
75
+ Args:
76
+ islamic_show_estimated:
77
+ Whether to add "estimated" label to Islamic holidays name
78
+ if holiday date is estimated.
79
+ """
80
+ ChristianHolidays.__init__(self)
81
+ HinduCalendarHolidays.__init__(self, cls=FijiHinduHolidays, show_estimated=True)
82
+ InternationalHolidays.__init__(self)
83
+ IslamicHolidays.__init__(
84
+ self, cls=FijiIslamicHolidays, show_estimated=islamic_show_estimated
85
+ )
86
+ kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_MON)
87
+ super().__init__(*args, **kwargs)
88
+
89
+ def _populate_public_holidays(self):
90
+ # New Year's Day.
91
+ self._add_observed(self._add_new_years_day("New Year's Day"))
92
+
93
+ # Good Friday.
94
+ self._add_good_friday("Good Friday")
95
+
96
+ # Easter Saturday.
97
+ self._add_holy_saturday("Easter Saturday")
98
+
99
+ # Easter Monday.
100
+ self._add_easter_monday("Easter Monday")
101
+
102
+ # National Sports Day.
103
+ if self._year <= 2018:
104
+ self._add_holiday_last_fri_of_jun("National Sports Day")
105
+
106
+ if self._year <= 2022:
107
+ # Constitution Day.
108
+ self._add_observed(self._add_holiday_sep_7("Constitution Day"))
109
+
110
+ if self._year >= 2023:
111
+ # Girmit Day.
112
+ self._move_holiday(
113
+ self._add_holiday_may_14("Girmit Day"),
114
+ rule=ALL_TO_NEAREST_MON,
115
+ show_observed_label=False,
116
+ )
117
+
118
+ # Ratu Sir Lala Sukuna Day.
119
+ name = "Ratu Sir Lala Sukuna Day"
120
+ if self._year == 2023:
121
+ self._add_holiday_last_mon_of_may(name)
122
+ elif self._year >= 2024:
123
+ self._add_holiday_last_fri_of_may(name)
124
+
125
+ # Fiji Day.
126
+ self._add_holiday_oct_10("Fiji Day")
127
+
128
+ # Diwali.
129
+ self._add_observed(self._add_diwali_india("Diwali"))
130
+
131
+ # Christmas Day.
132
+ self._add_observed(self._add_christmas_day("Christmas Day"), rule=SAT_SUN_TO_NEXT_MON_TUE)
133
+
134
+ # Boxing Day.
135
+ self._add_observed(self._add_christmas_day_two("Boxing Day"), rule=SAT_SUN_TO_NEXT_MON_TUE)
136
+
137
+ # Prophet Mohammed's Birthday.
138
+ for dt in self._add_mawlid_day("Prophet Mohammed's Birthday"):
139
+ self._add_observed(dt)
140
+
141
+ def _populate_workday_holidays(self):
142
+ if self._year >= 2023:
143
+ # Constitution Day.
144
+ self._add_holiday_sep_7("Constitution Day")
145
+
146
+
147
+ class FJ(Fiji):
148
+ pass
149
+
150
+
151
+ class FJI(Fiji):
152
+ pass
153
+
154
+
155
+ class FijiHinduHolidays(_CustomHinduHolidays):
156
+ # https://www.timeanddate.com/holidays/fiji/diwali
157
+ DIWALI_INDIA_DATES = {
158
+ 2016: (OCT, 31),
159
+ 2017: (OCT, 19),
160
+ 2018: (NOV, 7),
161
+ 2019: (OCT, 28),
162
+ 2020: (NOV, 14),
163
+ 2021: (NOV, 4),
164
+ 2022: (OCT, 25),
165
+ 2023: (NOV, 13),
166
+ 2024: (NOV, 1),
167
+ 2025: (OCT, 21),
168
+ }
169
+
170
+
171
+ class FijiIslamicHolidays(_CustomIslamicHolidays):
172
+ MAWLID_DATES = {
173
+ 2016: (DEC, 12),
174
+ 2017: (DEC, 2),
175
+ 2018: (NOV, 19),
176
+ 2019: (NOV, 9),
177
+ 2020: (OCT, 31),
178
+ 2021: (OCT, 18),
179
+ 2022: (OCT, 7), # looks like observed on FRI
180
+ 2023: (SEP, 30),
181
+ 2024: (SEP, 16),
182
+ 2025: (SEP, 6),
183
+ }
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS file)
7
+ # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -19,16 +19,17 @@ from holidays.holiday_base import HolidayBase
19
19
 
20
20
 
21
21
  class Finland(HolidayBase, ChristianHolidays, InternationalHolidays):
22
- """
22
+ """Finland holidays.
23
+
23
24
  References:
24
- - https://en.wikipedia.org/wiki/Public_holidays_in_Finland
25
- - `Bank holidays (Finnish) <https://www.suomenpankki.fi/fi/raha-ja-maksaminen/pankkivapaapaivat/>`_
26
- - `Bank holidays (English) <https://www.suomenpankki.fi/en/money-and-payments/bank-holidays/>`_
27
- - `Bank holidays (Swedish) <https://www.suomenpankki.fi/sv/pengar-och-betalningar/bankfria-dagar-i-finland/>`_
28
- - https://en.wikipedia.org/wiki/Flag_flying_days_in_Finland#Customary_flag_days
29
- - https://intermin.fi/en/flag-and-arms/flag-flying-days
30
- - https://intermin.fi/en/flag-and-arms/flag-days/2024
31
- - https://en.wikipedia.org/wiki/Independence_Day_(Finland)
25
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_Finland>
26
+ * [Bank holidays (Finnish)](https://www.suomenpankki.fi/fi/raha-ja-maksaminen/pankkivapaapaivat/)
27
+ * [Bank holidays (English)](https://www.suomenpankki.fi/en/money-and-payments/bank-holidays/)
28
+ * [Bank holidays (Swedish)](https://www.suomenpankki.fi/sv/pengar-och-betalningar/bankfria-dagar-i-finland/)
29
+ * <https://en.wikipedia.org/wiki/Flag_flying_days_in_Finland#Customary_flag_days>
30
+ * <https://intermin.fi/en/flag-and-arms/flag-flying-days>
31
+ * <https://intermin.fi/en/flag-and-arms/flag-days/2024>
32
+ * <https://en.wikipedia.org/wiki/Independence_Day_(Finland)>
32
33
  """
33
34
 
34
35
  country = "FI"
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS file)
7
+ # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -17,18 +17,15 @@ from holidays.holiday_base import HolidayBase
17
17
 
18
18
 
19
19
  class France(HolidayBase, ChristianHolidays, InternationalHolidays):
20
- """Official French holidays.
20
+ """France holidays.
21
+
22
+ References:
23
+ * <https://fr.wikipedia.org/wiki/Fêtes_et_jours_fériés_en_France>
24
+ * <https://www.service-public.fr/particuliers/vosdroits/F2405>
21
25
 
22
26
  Some provinces have specific holidays, only those are included in the
23
27
  PROVINCES, because these provinces have different administrative status,
24
28
  which makes it difficult to enumerate.
25
-
26
- For religious holidays usually happening on Sundays (Easter, Pentecost),
27
- only the following Monday is considered a holiday.
28
-
29
- Primary sources:
30
- https://fr.wikipedia.org/wiki/Fêtes_et_jours_fériés_en_France
31
- https://www.service-public.fr/particuliers/vosdroits/F2405
32
29
  """
33
30
 
34
31
  country = "FR"
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS file)
7
+ # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -17,22 +17,31 @@ from holidays.holiday_base import HolidayBase
17
17
 
18
18
 
19
19
  class Gabon(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays):
20
- """
20
+ """Gabon holidays.
21
+
21
22
  References:
22
- - https://en.wikipedia.org/wiki/Public_holidays_in_Gabon
23
- - https://www.timeanddate.com/holidays/gabon
24
- - https://www.officeholidays.com/countries/gabon
25
- - http://www.travail.gouv.ga/402-evenements/489-liste-des-jours-feries/
23
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_Gabon>
24
+ * <https://www.timeanddate.com/holidays/gabon>
25
+ * <https://www.officeholidays.com/countries/gabon>
26
+ * <http://www.travail.gouv.ga/402-evenements/489-liste-des-jours-feries/>
26
27
  """
27
28
 
28
29
  country = "GA"
29
30
  # On 17 August 1960, Gabon gained independence from France.
30
31
  start_year = 1961
31
32
 
32
- def __init__(self, *args, **kwargs) -> None:
33
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
34
+ """
35
+ Args:
36
+ islamic_show_estimated:
37
+ Whether to add "estimated" label to Islamic holidays name
38
+ if holiday date is estimated.
39
+ """
33
40
  ChristianHolidays.__init__(self)
34
41
  InternationalHolidays.__init__(self)
35
- IslamicHolidays.__init__(self, cls=GabonIslamicHolidays)
42
+ IslamicHolidays.__init__(
43
+ self, cls=GabonIslamicHolidays, show_estimated=islamic_show_estimated
44
+ )
36
45
  super().__init__(*args, **kwargs)
37
46
 
38
47
  def _populate_public_holidays(self):
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS file)
7
+ # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -20,12 +20,11 @@ from holidays.holiday_base import HolidayBase
20
20
 
21
21
 
22
22
  class Georgia(HolidayBase, ChristianHolidays, InternationalHolidays):
23
- """
24
- Georgia holidays.
23
+ """Georgia holidays.
25
24
 
26
25
  References:
27
- - https://en.wikipedia.org/wiki/Public_holidays_in_Georgia_(country)
28
- - https://matsne.gov.ge/en/document/view/1155567?publication=24
26
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_Georgia_(country)>
27
+ * <https://matsne.gov.ge/en/document/view/1155567?publication=24>
29
28
  """
30
29
 
31
30
  country = "GE"
@@ -101,9 +100,10 @@ class GEO(Georgia):
101
100
 
102
101
 
103
102
  class GeorgiaStaticHolidays:
104
- """
103
+ """Georgia special holidays.
104
+
105
105
  References:
106
- - https://www.matsne.gov.ge/ka/document/view/6173967
106
+ * <https://www.matsne.gov.ge/ka/document/view/6173967>
107
107
  """
108
108
 
109
109
  special_government_holidays = {
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS file)
7
+ # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -19,15 +19,14 @@ from holidays.holiday_base import HolidayBase
19
19
 
20
20
 
21
21
  class Germany(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays):
22
- """Official holidays for Germany in its current form.
22
+ """Germany holidays.
23
23
 
24
24
  This class doesn't return any holidays before 1990-10-03.
25
25
 
26
- Before that date the current Germany was separated into the "German
27
- Democratic Republic" and the "Federal Republic of Germany" which both had
28
- somewhat different holidays. Since this class is called "Germany" it
29
- doesn't really make sense to include the days from the two former
30
- countries.
26
+ Before that date the current Germany was separated into the "German Democratic
27
+ Republic" and the "Federal Republic of Germany" which both had somewhat
28
+ different holidays. Since this class is called "Germany" it doesn't really
29
+ make sense to include the days from the two former countries.
31
30
 
32
31
  "Mariä Himmelfahrt" is only a holiday in Bavaria (BY) and "Fronleichnam"
33
32
  in Saxony (SN) and Thuringia (TH) if municipality is mostly catholic which
@@ -241,11 +240,12 @@ class DEU(Germany):
241
240
 
242
241
 
243
242
  class GermanyStaticHolidays:
244
- """
243
+ """Germany special holidays.
244
+
245
245
  References:
246
- - https://www.stuttgarter-zeitung.de/inhalt.reformationstag-2017-einmalig-bundesweiter-feiertag.b7e189b3-a33d-41a3-a0f4-141cd13df54e.html
247
- - https://www.bbc.com/news/world-europe-52574748
248
- - https://gesetze.berlin.de/bsbe/document/jlr-FeiertGBEV8P1
246
+ * <https://www.stuttgarter-zeitung.de/inhalt.reformationstag-2017-einmalig-bundesweiter-feiertag.b7e189b3-a33d-41a3-a0f4-141cd13df54e.html>
247
+ * <https://www.bbc.com/news/world-europe-52574748>
248
+ * <https://gesetze.berlin.de/bsbe/document/jlr-FeiertGBEV8P1>
249
249
  """
250
250
 
251
251
  special_public_holidays = {
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS file)
7
+ # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -19,9 +19,11 @@ from holidays.observed_holiday_base import (
19
19
 
20
20
 
21
21
  class Ghana(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays):
22
- """
23
- https://www.mint.gov.gh/statutory-public-holidays/
24
- https://en.wikipedia.org/wiki/Public_holidays_in_Ghana
22
+ """Ghana holidays.
23
+
24
+ References:
25
+ * <https://www.mint.gov.gh/statutory-public-holidays/>
26
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_Ghana>
25
27
  """
26
28
 
27
29
  country = "GH"
@@ -30,10 +32,16 @@ class Ghana(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Islam
30
32
  observed_estimated_label = "%s (observed, estimated)"
31
33
  start_year = 1957
32
34
 
33
- def __init__(self, *args, **kwargs):
35
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
36
+ """
37
+ Args:
38
+ islamic_show_estimated:
39
+ Whether to add "estimated" label to Islamic holidays name
40
+ if holiday date is estimated.
41
+ """
34
42
  ChristianHolidays.__init__(self)
35
43
  InternationalHolidays.__init__(self)
36
- IslamicHolidays.__init__(self)
44
+ IslamicHolidays.__init__(self, show_estimated=islamic_show_estimated)
37
45
  kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_MON)
38
46
  super().__init__(*args, **kwargs)
39
47
 
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS file)
7
+ # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -23,12 +23,11 @@ from holidays.observed_holiday_base import (
23
23
 
24
24
 
25
25
  class Greece(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
26
- """
27
- Greece holidays.
26
+ """Greece holidays.
28
27
 
29
28
  References:
30
- - https://en.wikipedia.org/wiki/Public_holidays_in_Greece
31
- - `2024 Labor Day transfer <https://www.et.gr/api/DownloadFeksApi/?fek_pdf=20240201406>`_
29
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_Greece>
30
+ * [2024 Labor Day transfer](https://www.et.gr/api/DownloadFeksApi/?fek_pdf=20240201406)
32
31
  """
33
32
 
34
33
  country = "GR"
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS file)
7
+ # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -18,13 +18,12 @@ from holidays.holiday_base import HolidayBase
18
18
 
19
19
 
20
20
  class Greenland(HolidayBase, ChristianHolidays, InternationalHolidays):
21
- """
22
- Greenland holidays.
21
+ """Greenland holidays.
23
22
 
24
23
  References:
25
- - https://en.wikipedia.org/wiki/Public_holidays_in_Greenland
26
- - `Greenlandic names source <https://nalunaarutit.gl/groenlandsk-lovgivning/2008/bkg-26-2008?sc_lang=kl-GL>`_
27
- - `Translation source <https://www.norden.org/en/info-norden/public-holidays-greenland>`_
24
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_Greenland>
25
+ * [Greenlandic names source](https://nalunaarutit.gl/groenlandsk-lovgivning/2008/bkg-26-2008?sc_lang=kl-GL)
26
+ * [Translation source](https://www.norden.org/en/info-norden/public-holidays-greenland)
28
27
  """
29
28
 
30
29
  country = "GL"