holidays 0.79__py3-none-any.whl → 0.81__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 (124) hide show
  1. holidays/calendars/chinese.py +39 -1
  2. holidays/calendars/hindu.py +1 -0
  3. holidays/constants.py +0 -1
  4. holidays/countries/__init__.py +13 -0
  5. holidays/countries/argentina.py +4 -0
  6. holidays/countries/australia.py +191 -295
  7. holidays/countries/bosnia_and_herzegovina.py +5 -1
  8. holidays/countries/burkina_faso.py +5 -0
  9. holidays/countries/burundi.py +95 -40
  10. holidays/countries/cameroon.py +5 -0
  11. holidays/countries/canada.py +7 -0
  12. holidays/countries/chad.py +5 -0
  13. holidays/countries/china.py +4 -0
  14. holidays/countries/christmas_island.py +6 -0
  15. holidays/countries/comoros.py +121 -0
  16. holidays/countries/eritrea.py +104 -0
  17. holidays/countries/gabon.py +2 -0
  18. holidays/countries/georgia.py +9 -7
  19. holidays/countries/guinea_bissau.py +0 -4
  20. holidays/countries/hongkong.py +5 -1
  21. holidays/countries/kyrgyzstan.py +2 -0
  22. holidays/countries/macau.py +74 -63
  23. holidays/countries/maldives.py +2 -0
  24. holidays/countries/mauritania.py +2 -0
  25. holidays/countries/mongolia.py +2 -0
  26. holidays/countries/nigeria.py +198 -27
  27. holidays/countries/philippines.py +11 -2
  28. holidays/countries/rwanda.py +162 -0
  29. holidays/countries/saint_helena_ascension_and_tristan_da_cunha.py +197 -0
  30. holidays/countries/sierra_leone.py +1 -1
  31. holidays/countries/singapore.py +4 -0
  32. holidays/countries/somalia.py +79 -0
  33. holidays/countries/south_korea.py +4 -0
  34. holidays/countries/south_sudan.py +133 -0
  35. holidays/countries/spain.py +26 -0
  36. holidays/countries/sudan.py +115 -0
  37. holidays/countries/taiwan.py +5 -1
  38. holidays/countries/tajikistan.py +116 -0
  39. holidays/countries/tanzania.py +291 -147
  40. holidays/countries/turkmenistan.py +6 -0
  41. holidays/countries/uganda.py +101 -0
  42. holidays/countries/vietnam.py +4 -0
  43. holidays/financial/__init__.py +5 -0
  44. holidays/financial/national_stock_exchange_of_india.py +169 -0
  45. holidays/groups/chinese.py +3 -15
  46. holidays/groups/eastern.py +1 -3
  47. holidays/groups/islamic.py +10 -0
  48. holidays/locale/ar_SD/LC_MESSAGES/SD.mo +0 -0
  49. holidays/locale/bs/LC_MESSAGES/BA.mo +0 -0
  50. holidays/locale/en_GB/LC_MESSAGES/SH.mo +0 -0
  51. holidays/locale/en_HK/LC_MESSAGES/HK.mo +0 -0
  52. holidays/locale/en_IN/LC_MESSAGES/XNSE.mo +0 -0
  53. holidays/locale/en_MO/LC_MESSAGES/MO.mo +0 -0
  54. holidays/locale/en_NG/LC_MESSAGES/NG.mo +0 -0
  55. holidays/locale/en_PH/LC_MESSAGES/PH.mo +0 -0
  56. holidays/locale/en_SG/LC_MESSAGES/SG.mo +0 -0
  57. holidays/locale/en_US/LC_MESSAGES/AR.mo +0 -0
  58. holidays/locale/en_US/LC_MESSAGES/BA.mo +0 -0
  59. holidays/locale/en_US/LC_MESSAGES/BI.mo +0 -0
  60. holidays/locale/en_US/LC_MESSAGES/CN.mo +0 -0
  61. holidays/locale/en_US/LC_MESSAGES/ES.mo +0 -0
  62. holidays/locale/en_US/LC_MESSAGES/GE.mo +0 -0
  63. holidays/locale/en_US/LC_MESSAGES/GW.mo +0 -0
  64. holidays/locale/en_US/LC_MESSAGES/HK.mo +0 -0
  65. holidays/locale/en_US/LC_MESSAGES/KR.mo +0 -0
  66. holidays/locale/en_US/LC_MESSAGES/MN.mo +0 -0
  67. holidays/locale/en_US/LC_MESSAGES/MO.mo +0 -0
  68. holidays/locale/en_US/LC_MESSAGES/NG.mo +0 -0
  69. holidays/locale/en_US/LC_MESSAGES/PH.mo +0 -0
  70. holidays/locale/en_US/LC_MESSAGES/RW.mo +0 -0
  71. holidays/locale/en_US/LC_MESSAGES/SD.mo +0 -0
  72. holidays/locale/en_US/LC_MESSAGES/SG.mo +0 -0
  73. holidays/locale/en_US/LC_MESSAGES/SH.mo +0 -0
  74. holidays/locale/en_US/LC_MESSAGES/TJ.mo +0 -0
  75. holidays/locale/en_US/LC_MESSAGES/TW.mo +0 -0
  76. holidays/locale/en_US/LC_MESSAGES/TZ.mo +0 -0
  77. holidays/locale/en_US/LC_MESSAGES/VN.mo +0 -0
  78. holidays/locale/en_US/LC_MESSAGES/XNSE.mo +0 -0
  79. holidays/locale/es/LC_MESSAGES/AR.mo +0 -0
  80. holidays/locale/es/LC_MESSAGES/ES.mo +0 -0
  81. holidays/locale/fil/LC_MESSAGES/PH.mo +0 -0
  82. holidays/locale/fr/LC_MESSAGES/RW.mo +0 -0
  83. holidays/locale/fr_BI/LC_MESSAGES/BI.mo +0 -0
  84. holidays/locale/hi/LC_MESSAGES/XNSE.mo +0 -0
  85. holidays/locale/ka/LC_MESSAGES/GE.mo +0 -0
  86. holidays/locale/ko/LC_MESSAGES/KR.mo +0 -0
  87. holidays/locale/mn/LC_MESSAGES/MN.mo +0 -0
  88. holidays/locale/pt_GW/LC_MESSAGES/GW.mo +0 -0
  89. holidays/locale/pt_MO/LC_MESSAGES/MO.mo +0 -0
  90. holidays/locale/ru/LC_MESSAGES/TJ.mo +0 -0
  91. holidays/locale/rw/LC_MESSAGES/RW.mo +0 -0
  92. holidays/locale/sr/LC_MESSAGES/BA.mo +0 -0
  93. holidays/locale/sw/LC_MESSAGES/TZ.mo +0 -0
  94. holidays/locale/tg/LC_MESSAGES/TJ.mo +0 -0
  95. holidays/locale/th/LC_MESSAGES/CN.mo +0 -0
  96. holidays/locale/th/LC_MESSAGES/HK.mo +0 -0
  97. holidays/locale/th/LC_MESSAGES/KR.mo +0 -0
  98. holidays/locale/th/LC_MESSAGES/MO.mo +0 -0
  99. holidays/locale/th/LC_MESSAGES/PH.mo +0 -0
  100. holidays/locale/th/LC_MESSAGES/SG.mo +0 -0
  101. holidays/locale/th/LC_MESSAGES/TW.mo +0 -0
  102. holidays/locale/th/LC_MESSAGES/VN.mo +0 -0
  103. holidays/locale/uk/LC_MESSAGES/AR.mo +0 -0
  104. holidays/locale/uk/LC_MESSAGES/BA.mo +0 -0
  105. holidays/locale/uk/LC_MESSAGES/ES.mo +0 -0
  106. holidays/locale/uk/LC_MESSAGES/GE.mo +0 -0
  107. holidays/locale/vi/LC_MESSAGES/VN.mo +0 -0
  108. holidays/locale/zh_CN/LC_MESSAGES/CN.mo +0 -0
  109. holidays/locale/zh_CN/LC_MESSAGES/HK.mo +0 -0
  110. holidays/locale/zh_CN/LC_MESSAGES/MO.mo +0 -0
  111. holidays/locale/zh_CN/LC_MESSAGES/TW.mo +0 -0
  112. holidays/locale/zh_HK/LC_MESSAGES/HK.mo +0 -0
  113. holidays/locale/zh_MO/LC_MESSAGES/MO.mo +0 -0
  114. holidays/locale/zh_TW/LC_MESSAGES/CN.mo +0 -0
  115. holidays/locale/zh_TW/LC_MESSAGES/TW.mo +0 -0
  116. holidays/observed_holiday_base.py +1 -1
  117. holidays/registry.py +39 -14
  118. holidays/version.py +1 -1
  119. {holidays-0.79.dist-info → holidays-0.81.dist-info}/METADATA +76 -7
  120. {holidays-0.79.dist-info → holidays-0.81.dist-info}/RECORD +124 -97
  121. {holidays-0.79.dist-info → holidays-0.81.dist-info}/WHEEL +0 -0
  122. {holidays-0.79.dist-info → holidays-0.81.dist-info}/licenses/CONTRIBUTORS +0 -0
  123. {holidays-0.79.dist-info → holidays-0.81.dist-info}/licenses/LICENSE +0 -0
  124. {holidays-0.79.dist-info → holidays-0.81.dist-info}/top_level.txt +0 -0
@@ -14,7 +14,7 @@ from datetime import date
14
14
  from typing import Optional
15
15
 
16
16
  from holidays.calendars.custom import _CustomCalendar
17
- from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, JUN, SEP, OCT, NOV
17
+ from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, JUN, SEP, OCT, NOV, DEC
18
18
 
19
19
  CHINESE_CALENDAR = "CHINESE_CALENDAR"
20
20
  KOREAN_CALENDAR = "KOREAN_CALENDAR"
@@ -1307,6 +1307,24 @@ class _ChineseLunisolar:
1307
1307
  2053: (FEB, 18),
1308
1308
  }
1309
1309
 
1310
+ WINTER_SOLSTICE_THRESHOLDS: dict[str, dict[str, dict[int, int]]] = {
1311
+ # UTC+7.
1312
+ VIETNAMESE_CALENDAR: {
1313
+ "dec_21": {0: 1980, 1: 2017, 2: 2050, 3: 2083},
1314
+ "dec_23": {3: 1943},
1315
+ },
1316
+ # UTC+8.
1317
+ CHINESE_CALENDAR: {
1318
+ "dec_21": {0: 1988, 1: 2021, 2: 2058, 3: 2091},
1319
+ "dec_23": {3: 1947},
1320
+ },
1321
+ # UTC+9.
1322
+ KOREAN_CALENDAR: {
1323
+ "dec_21": {0: 1992, 1: 2029, 2: 2062, 3: 2099},
1324
+ "dec_23": {3: 1955},
1325
+ },
1326
+ }
1327
+
1310
1328
  def __init__(self, calendar: str = CHINESE_CALENDAR) -> None:
1311
1329
  self.__verify_calendar(calendar)
1312
1330
  self.__calendar = calendar
@@ -1359,6 +1377,26 @@ class _ChineseLunisolar:
1359
1377
  def mid_autumn_date(self, year: int, calendar=None) -> tuple[Optional[date], bool]:
1360
1378
  return self._get_holiday(MID_AUTUMN, year, calendar)
1361
1379
 
1380
+ def winter_solstice_date(self, year: int, calendar=None) -> tuple[Optional[date], bool]:
1381
+ """Return Winter Solstice (22nd solar term in Chinese Lunisolar calendar) date.
1382
+
1383
+ !!! note "Note"
1384
+ This approximation is reliable for 1941-2099 years.
1385
+ """
1386
+ calendar = calendar or self.__calendar
1387
+ self.__verify_calendar(calendar)
1388
+
1389
+ thresholds = self.WINTER_SOLSTICE_THRESHOLDS[calendar]
1390
+ year_mod = year % 4
1391
+ if year >= thresholds["dec_21"][year_mod]:
1392
+ day = 21
1393
+ elif year <= thresholds["dec_23"].get(year_mod, 0):
1394
+ day = 23
1395
+ else:
1396
+ day = 22
1397
+
1398
+ return date(year, DEC, day), not (1941 <= year <= 2099)
1399
+
1362
1400
 
1363
1401
  class _CustomChineseHolidays(_CustomCalendar, _ChineseLunisolar):
1364
1402
  pass
@@ -586,6 +586,7 @@ class _HinduLunisolar:
586
586
  2023: (NOV, 27),
587
587
  2024: (NOV, 15),
588
588
  2025: (NOV, 5),
589
+ 2026: (NOV, 24),
589
590
  2027: (NOV, 14),
590
591
  2028: (NOV, 2),
591
592
  2029: (NOV, 21),
holidays/constants.py CHANGED
@@ -42,7 +42,6 @@ ARMED_FORCES = "armed_forces"
42
42
  BANK = "bank"
43
43
  GOVERNMENT = "government"
44
44
  HALF_DAY = "half_day"
45
- MANDATORY = "mandatory"
46
45
  OPTIONAL = "optional"
47
46
  PUBLIC = "public"
48
47
  SCHOOL = "school"
@@ -59,6 +59,7 @@ from holidays.countries.china import China, CN, CHN
59
59
  from holidays.countries.christmas_island import ChristmasIsland, CX, CXR
60
60
  from holidays.countries.cocos_islands import CocosIslands, CC, CCK
61
61
  from holidays.countries.colombia import Colombia, CO, COL
62
+ from holidays.countries.comoros import Comoros, KM, COM
62
63
  from holidays.countries.congo import Congo, CG, COG
63
64
  from holidays.countries.cook_islands import CookIslands, CK, COK
64
65
  from holidays.countries.costa_rica import CostaRica, CR, CRI
@@ -76,6 +77,7 @@ from holidays.countries.ecuador import Ecuador, EC, ECU
76
77
  from holidays.countries.egypt import Egypt, EG, EGY
77
78
  from holidays.countries.el_salvador import ElSalvador, SV, SLV
78
79
  from holidays.countries.equatorial_guinea import EquatorialGuinea, GQ, GNQ
80
+ from holidays.countries.eritrea import Eritrea, ER, ERI
79
81
  from holidays.countries.estonia import Estonia, EE, EST
80
82
  from holidays.countries.eswatini import Eswatini, SZ, SZW, Swaziland
81
83
  from holidays.countries.ethiopia import Ethiopia, ET, ETH
@@ -192,7 +194,13 @@ from holidays.countries.qatar import Qatar, QA, QAT
192
194
  from holidays.countries.reunion import Reunion, RE, REU, HolidaysRE
193
195
  from holidays.countries.romania import Romania, RO, ROU
194
196
  from holidays.countries.russia import Russia, RU, RUS
197
+ from holidays.countries.rwanda import Rwanda, RW, RWA
195
198
  from holidays.countries.saint_barthelemy import SaintBarthelemy, BL, BLM, HolidaysBL
199
+ from holidays.countries.saint_helena_ascension_and_tristan_da_cunha import (
200
+ SaintHelenaAscensionAndTristanDaCunha,
201
+ SH,
202
+ SHN,
203
+ )
196
204
  from holidays.countries.saint_kitts_and_nevis import SaintKittsAndNevis, KN, KNA
197
205
  from holidays.countries.saint_lucia import SaintLucia, LC, LCA
198
206
  from holidays.countries.saint_martin import SaintMartin, MF, MAF, HolidaysMF
@@ -220,6 +228,7 @@ from holidays.countries.sint_maarten import SintMaarten, SX, SXM
220
228
  from holidays.countries.slovakia import Slovakia, SK, SVK
221
229
  from holidays.countries.slovenia import Slovenia, SI, SVN
222
230
  from holidays.countries.solomon_islands import SolomonIslands, SB, SLB
231
+ from holidays.countries.somalia import Somalia, SO, SOM
223
232
  from holidays.countries.south_africa import SouthAfrica, ZA, ZAF
224
233
  from holidays.countries.south_georgia_and_the_south_sandwich_islands import (
225
234
  SouthGeorgiaAndTheSouthSandwichIslands,
@@ -227,14 +236,17 @@ from holidays.countries.south_georgia_and_the_south_sandwich_islands import (
227
236
  SGS,
228
237
  )
229
238
  from holidays.countries.south_korea import SouthKorea, KR, KOR, Korea
239
+ from holidays.countries.south_sudan import SouthSudan, SS, SSD
230
240
  from holidays.countries.spain import Spain, ES, ESP
231
241
  from holidays.countries.sri_lanka import SriLanka, LK, LKA
242
+ from holidays.countries.sudan import Sudan, SD, SDN
232
243
  from holidays.countries.suriname import Suriname, SR, SUR
233
244
  from holidays.countries.svalbard_and_jan_mayen import SvalbardAndJanMayen, SJ, SJM, HolidaysSJ
234
245
  from holidays.countries.sweden import Sweden, SE, SWE
235
246
  from holidays.countries.switzerland import Switzerland, CH, CHE
236
247
  from holidays.countries.syrian_arab_republic import SyrianArabRepublic, SY, SYR
237
248
  from holidays.countries.taiwan import Taiwan, TW, TWN
249
+ from holidays.countries.tajikistan import Tajikistan, TJ, TJK
238
250
  from holidays.countries.tanzania import Tanzania, TZ, TZA
239
251
  from holidays.countries.thailand import Thailand, TH, THA
240
252
  from holidays.countries.timor_leste import TimorLeste, TL, TLS
@@ -247,6 +259,7 @@ from holidays.countries.turkey import Turkey, TR, TUR
247
259
  from holidays.countries.turkmenistan import Turkmenistan, TM, TKM
248
260
  from holidays.countries.turks_and_caicos_islands import TurksAndCaicosIslands, TC, TCA
249
261
  from holidays.countries.tuvalu import Tuvalu, TV, TUV
262
+ from holidays.countries.uganda import Uganda, UG, UGA
250
263
  from holidays.countries.ukraine import Ukraine, UA, UKR
251
264
  from holidays.countries.united_arab_emirates import UnitedArabEmirates, AE, ARE
252
265
  from holidays.countries.united_kingdom import UnitedKingdom, GB, GBR, UK
@@ -147,6 +147,10 @@ class Argentina(
147
147
 
148
148
  country = "AR"
149
149
  default_language = "es"
150
+ # %s (estimated).
151
+ estimated_label = tr("%s (estimado)")
152
+ # %s (observed, estimated).
153
+ observed_estimated_label = tr("%s (observado, estimado)")
150
154
  # %s (observed).
151
155
  observed_label = tr("%s (observado)")
152
156
  # Decree-Law 2446.