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
holidays/__init__.py CHANGED
@@ -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
@@ -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
@@ -12,6 +12,7 @@
12
12
 
13
13
  # flake8: noqa: F401
14
14
 
15
+ from holidays.calendars.balinese_saka import _BalineseSakaLunar
15
16
  from holidays.calendars.buddhist import _BuddhistLunisolar, _CustomBuddhistHolidays
16
17
  from holidays.calendars.chinese import _ChineseLunisolar, _CustomChineseHolidays
17
18
  from holidays.calendars.custom import _CustomCalendar
@@ -0,0 +1,112 @@
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 datetime import date
14
+ from typing import Optional
15
+
16
+ from holidays.calendars.gregorian import MAR, APR
17
+
18
+ NYEPI = "NYEPI"
19
+
20
+
21
+ class _BalineseSakaLunar:
22
+ """
23
+ Balinese Saka lunar calendar.
24
+
25
+ The Balinese saka calendar is one of two calendars used on the Indonesian island
26
+ of Bali. Unlike the 210-day pawukon calendar, it is based on the phases of the Moon,
27
+ and is approximately the same length as the tropical year (solar year, Gregorian year).
28
+ https://en.wikipedia.org/wiki/Balinese_saka_calendar
29
+ """
30
+
31
+ NYEPI_DATES = {
32
+ 1983: (MAR, 15),
33
+ 1984: (MAR, 4),
34
+ 1985: (MAR, 22),
35
+ 1986: (MAR, 12),
36
+ 1987: (MAR, 31),
37
+ 1988: (MAR, 19),
38
+ 1989: (MAR, 9),
39
+ 1990: (MAR, 27),
40
+ 1991: (MAR, 17),
41
+ 1992: (MAR, 5),
42
+ 1993: (MAR, 24),
43
+ 1994: (MAR, 12),
44
+ 1995: (APR, 1),
45
+ 1996: (MAR, 21),
46
+ 1997: (APR, 9),
47
+ 1998: (MAR, 29),
48
+ 1999: (MAR, 18),
49
+ 2000: (APR, 4),
50
+ 2001: (MAR, 25),
51
+ 2002: (APR, 13),
52
+ 2003: (APR, 2),
53
+ 2004: (MAR, 22),
54
+ 2005: (MAR, 11),
55
+ 2006: (MAR, 30),
56
+ 2007: (MAR, 19),
57
+ 2008: (MAR, 7),
58
+ 2009: (MAR, 26),
59
+ 2010: (MAR, 16),
60
+ 2011: (MAR, 5),
61
+ 2012: (MAR, 23),
62
+ 2013: (MAR, 12),
63
+ 2014: (MAR, 31),
64
+ 2015: (MAR, 21),
65
+ 2016: (MAR, 9),
66
+ 2017: (MAR, 28),
67
+ 2018: (MAR, 17),
68
+ 2019: (MAR, 7),
69
+ 2020: (MAR, 25),
70
+ 2021: (MAR, 14),
71
+ 2022: (MAR, 3),
72
+ 2023: (MAR, 22),
73
+ 2024: (MAR, 11),
74
+ 2025: (MAR, 29),
75
+ 2026: (MAR, 19),
76
+ 2027: (MAR, 8),
77
+ 2028: (MAR, 26),
78
+ 2029: (MAR, 15),
79
+ 2030: (MAR, 5),
80
+ 2031: (MAR, 24),
81
+ 2032: (MAR, 12),
82
+ 2033: (MAR, 31),
83
+ 2034: (MAR, 20),
84
+ 2035: (MAR, 10),
85
+ 2036: (MAR, 28),
86
+ 2037: (MAR, 17),
87
+ 2038: (MAR, 6),
88
+ 2039: (MAR, 25),
89
+ 2040: (MAR, 14),
90
+ 2041: (MAR, 3),
91
+ 2042: (MAR, 22),
92
+ 2043: (MAR, 11),
93
+ 2044: (MAR, 29),
94
+ 2045: (MAR, 19),
95
+ 2046: (MAR, 8),
96
+ 2047: (MAR, 27),
97
+ 2048: (MAR, 15),
98
+ 2049: (MAR, 5),
99
+ 2050: (MAR, 24),
100
+ }
101
+
102
+ def _get_holiday(self, holiday: str, year: int) -> Optional[date]:
103
+ dt = getattr(self, f"{holiday}_DATES", {}).get(year, ())
104
+ return date(year, *dt) if dt else None
105
+
106
+ def nyepi_date(self, year: int) -> Optional[date]:
107
+ """
108
+ Data References:
109
+ * [1983-2025](https://id.wikipedia.org/wiki/Indonesia_dalam_tahun_1983)
110
+ * [2020-2050](https://www.balitrips.com/balinese-temples-ceremony)
111
+ """
112
+ return self._get_holiday(NYEPI, year)
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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