holidays 0.72__py3-none-any.whl → 0.74__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 (93) hide show
  1. holidays/calendars/hindu.py +147 -3
  2. holidays/constants.py +8 -1
  3. holidays/countries/__init__.py +10 -0
  4. holidays/countries/aland_islands.py +63 -0
  5. holidays/countries/andorra.py +130 -46
  6. holidays/countries/angola.py +2 -2
  7. holidays/countries/argentina.py +12 -2
  8. holidays/countries/azerbaijan.py +1 -1
  9. holidays/countries/belgium.py +1 -1
  10. holidays/countries/benin.py +199 -0
  11. holidays/countries/bermuda.py +141 -0
  12. holidays/countries/british_virgin_islands.py +205 -0
  13. holidays/countries/chile.py +1 -1
  14. holidays/countries/cocos_islands.py +259 -0
  15. holidays/countries/curacao.py +1 -1
  16. holidays/countries/dominican_republic.py +1 -1
  17. holidays/countries/ecuador.py +1 -1
  18. holidays/countries/equatorial_guinea.py +150 -0
  19. holidays/countries/ethiopia.py +1 -1
  20. holidays/countries/finland.py +200 -36
  21. holidays/countries/grenada.py +143 -0
  22. holidays/countries/italy.py +1 -1
  23. holidays/countries/ivory_coast.py +1 -1
  24. holidays/countries/kazakhstan.py +23 -23
  25. holidays/countries/malaysia.py +0 -8
  26. holidays/countries/mexico.py +1 -1
  27. holidays/countries/morocco.py +1 -1
  28. holidays/countries/nepal.py +441 -0
  29. holidays/countries/north_macedonia.py +267 -15
  30. holidays/countries/norway.py +1 -1
  31. holidays/countries/panama.py +1 -1
  32. holidays/countries/paraguay.py +1 -1
  33. holidays/countries/philippines.py +2 -0
  34. holidays/countries/slovenia.py +1 -1
  35. holidays/countries/sweden.py +1 -1
  36. holidays/countries/thailand.py +2 -2
  37. holidays/countries/togo.py +182 -0
  38. holidays/countries/trinidad_and_tobago.py +1 -1
  39. holidays/countries/tuvalu.py +1 -1
  40. holidays/countries/ukraine.py +44 -44
  41. holidays/countries/united_states.py +1 -1
  42. holidays/countries/vatican_city.py +29 -31
  43. holidays/countries/venezuela.py +1 -1
  44. holidays/countries/yemen.py +207 -0
  45. holidays/groups/chinese.py +3 -3
  46. holidays/groups/christian.py +7 -7
  47. holidays/groups/hindu.py +121 -1
  48. holidays/groups/international.py +9 -9
  49. holidays/groups/islamic.py +3 -3
  50. holidays/locale/ar/LC_MESSAGES/YE.mo +0 -0
  51. holidays/locale/ca/LC_MESSAGES/AD.mo +0 -0
  52. holidays/locale/coa_CC/LC_MESSAGES/CC.mo +0 -0
  53. holidays/locale/en_CC/LC_MESSAGES/CC.mo +0 -0
  54. holidays/locale/en_GD/LC_MESSAGES/GD.mo +0 -0
  55. holidays/locale/en_US/LC_MESSAGES/AD.mo +0 -0
  56. holidays/locale/en_US/LC_MESSAGES/AR.mo +0 -0
  57. holidays/locale/en_US/LC_MESSAGES/AX.mo +0 -0
  58. holidays/locale/en_US/LC_MESSAGES/BJ.mo +0 -0
  59. holidays/locale/en_US/LC_MESSAGES/CC.mo +0 -0
  60. holidays/locale/en_US/LC_MESSAGES/FI.mo +0 -0
  61. holidays/locale/en_US/LC_MESSAGES/GD.mo +0 -0
  62. holidays/locale/en_US/LC_MESSAGES/GQ.mo +0 -0
  63. holidays/locale/en_US/LC_MESSAGES/MK.mo +0 -0
  64. holidays/locale/en_US/LC_MESSAGES/TG.mo +0 -0
  65. holidays/locale/en_US/LC_MESSAGES/TH.mo +0 -0
  66. holidays/locale/en_US/LC_MESSAGES/VG.mo +0 -0
  67. holidays/locale/en_US/LC_MESSAGES/YE.mo +0 -0
  68. holidays/locale/en_VG/LC_MESSAGES/VG.mo +0 -0
  69. holidays/locale/es/LC_MESSAGES/AR.mo +0 -0
  70. holidays/locale/es/LC_MESSAGES/GQ.mo +0 -0
  71. holidays/locale/fi/LC_MESSAGES/AX.mo +0 -0
  72. holidays/locale/fi/LC_MESSAGES/FI.mo +0 -0
  73. holidays/locale/fr/LC_MESSAGES/TG.mo +0 -0
  74. holidays/locale/fr_BJ/LC_MESSAGES/BJ.mo +0 -0
  75. holidays/locale/mk/LC_MESSAGES/MK.mo +0 -0
  76. holidays/locale/sv_FI/LC_MESSAGES/AX.mo +0 -0
  77. holidays/locale/sv_FI/LC_MESSAGES/FI.mo +0 -0
  78. holidays/locale/th/LC_MESSAGES/AX.mo +0 -0
  79. holidays/locale/th/LC_MESSAGES/FI.mo +0 -0
  80. holidays/locale/uk/LC_MESSAGES/AD.mo +0 -0
  81. holidays/locale/uk/LC_MESSAGES/AR.mo +0 -0
  82. holidays/locale/uk/LC_MESSAGES/AX.mo +0 -0
  83. holidays/locale/uk/LC_MESSAGES/FI.mo +0 -0
  84. holidays/locale/uk/LC_MESSAGES/MK.mo +0 -0
  85. holidays/locale/uk/LC_MESSAGES/TH.mo +0 -0
  86. holidays/registry.py +10 -0
  87. holidays/version.py +1 -1
  88. {holidays-0.72.dist-info → holidays-0.74.dist-info}/METADATA +80 -10
  89. {holidays-0.72.dist-info → holidays-0.74.dist-info}/RECORD +93 -55
  90. {holidays-0.72.dist-info → holidays-0.74.dist-info}/WHEEL +1 -1
  91. {holidays-0.72.dist-info → holidays-0.74.dist-info}/licenses/CONTRIBUTORS +2 -0
  92. {holidays-0.72.dist-info → holidays-0.74.dist-info}/licenses/LICENSE +0 -0
  93. {holidays-0.72.dist-info → holidays-0.74.dist-info}/top_level.txt +0 -0
@@ -28,8 +28,10 @@ GOVARDHAN_PUJA = "GOVARDHAN_PUJA"
28
28
  GUDI_PADWA = "GUDI_PADWA"
29
29
  GURU_GOBIND_SINGH_JAYANTI = "GURU_GOBIND_SINGH_JAYANTI"
30
30
  GURU_NANAK_JAYANTI = "GURU_NANAK_JAYANTI"
31
+ GYALPO_LOSAR = "GYALPO_LOSAR"
31
32
  HOLI = "HOLI"
32
33
  JANMASHTAMI = "JANMASHTAMI"
34
+ MAHA_ASHTAMI = "MAHA_ASHTAMI"
33
35
  MAHA_NAVAMI = "MAHA_NAVAMI"
34
36
  MAHA_SHIVARATRI = "MAHA_SHIVARATRI"
35
37
  MAHAVIR_JAYANTI = "MAHAVIR_JAYANTI"
@@ -39,6 +41,8 @@ PONGAL = "PONGAL"
39
41
  RAKSHA_BANDHAN = "RAKSHA_BANDHAN"
40
42
  RAM_NAVAMI = "RAM_NAVAMI"
41
43
  SHARAD_NAVRATRI = "SHARAD_NAVRATRI"
44
+ SONAM_LOSAR = "SONAM_LOSAR"
45
+ TAMU_LOSAR = "TAMU_LOSAR"
42
46
  THAIPUSAM = "THAIPUSAM"
43
47
  VAISAKHI = "VAISAKHI"
44
48
 
@@ -350,7 +354,7 @@ class _HinduLunisolar:
350
354
  2021: (NOV, 4),
351
355
  2022: (OCT, 24),
352
356
  2023: (NOV, 12),
353
- 2024: (NOV, 1),
357
+ 2024: (OCT, 31),
354
358
  2025: (OCT, 20),
355
359
  2026: (NOV, 8),
356
360
  2027: (OCT, 29),
@@ -593,6 +597,37 @@ class _HinduLunisolar:
593
597
  2035: (NOV, 15),
594
598
  }
595
599
 
600
+ # https://www.timeanddate.com/holidays/nepal/gyalpo-losar
601
+ # https://www.ashesh.com.np/nepali-calendar/
602
+ GYALPO_LOSAR_DATES = {
603
+ 2010: (FEB, 13),
604
+ 2011: (MAR, 5),
605
+ 2012: (FEB, 22),
606
+ 2013: (MAR, 12),
607
+ 2014: (MAR, 2),
608
+ 2015: (FEB, 19),
609
+ 2016: (MAR, 9),
610
+ 2017: (FEB, 27),
611
+ 2018: (FEB, 16),
612
+ 2019: (MAR, 7),
613
+ 2020: (FEB, 24),
614
+ 2021: (MAR, 14),
615
+ 2022: (MAR, 3),
616
+ 2023: (FEB, 21),
617
+ 2024: (MAR, 11),
618
+ 2025: (FEB, 28),
619
+ 2026: (FEB, 18),
620
+ 2027: (FEB, 7),
621
+ 2028: (FEB, 26),
622
+ 2029: (FEB, 14),
623
+ 2030: (MAR, 5),
624
+ 2031: (FEB, 22),
625
+ 2032: (FEB, 12),
626
+ 2033: (MAR, 2),
627
+ 2034: (FEB, 19),
628
+ 2035: (FEB, 9),
629
+ }
630
+
596
631
  # https://www.timeanddate.com/holidays/india/holi
597
632
  HOLI_DATES = {
598
633
  2001: (MAR, 10),
@@ -671,6 +706,45 @@ class _HinduLunisolar:
671
706
  2035: (AUG, 26),
672
707
  }
673
708
 
709
+ # https://www.timeanddate.com/holidays/india/maha-ashtami
710
+ MAHA_ASHTAMI_DATES = {
711
+ 2001: (OCT, 24),
712
+ 2002: (OCT, 13),
713
+ 2003: (OCT, 3),
714
+ 2004: (OCT, 21),
715
+ 2005: (OCT, 11),
716
+ 2006: (SEP, 30),
717
+ 2007: (OCT, 19),
718
+ 2008: (OCT, 7),
719
+ 2009: (SEP, 26),
720
+ 2010: (OCT, 15),
721
+ 2011: (OCT, 4),
722
+ 2012: (OCT, 22),
723
+ 2013: (OCT, 12),
724
+ 2014: (OCT, 2),
725
+ 2015: (OCT, 21),
726
+ 2016: (OCT, 9),
727
+ 2017: (SEP, 28),
728
+ 2018: (OCT, 17),
729
+ 2019: (OCT, 6),
730
+ 2020: (OCT, 23),
731
+ 2021: (OCT, 13),
732
+ 2022: (OCT, 3),
733
+ 2023: (OCT, 22),
734
+ 2024: (OCT, 11),
735
+ 2025: (SEP, 30),
736
+ 2026: (OCT, 19),
737
+ 2027: (OCT, 7),
738
+ 2028: (SEP, 26),
739
+ 2029: (OCT, 14),
740
+ 2030: (OCT, 4),
741
+ 2031: (OCT, 23),
742
+ 2032: (OCT, 12),
743
+ 2033: (OCT, 2),
744
+ 2034: (OCT, 20),
745
+ 2035: (OCT, 9),
746
+ }
747
+
674
748
  # https://www.timeanddate.com/holidays/india/maha-navami
675
749
  MAHA_NAVAMI_DATES = {
676
750
  2001: (OCT, 25),
@@ -690,8 +764,8 @@ class _HinduLunisolar:
690
764
  2015: (OCT, 21),
691
765
  2016: (OCT, 10),
692
766
  2017: (SEP, 29),
693
- 2018: (OCT, 18),
694
- 2019: (OCT, 7),
767
+ 2018: (OCT, 17),
768
+ 2019: (OCT, 6),
695
769
  2020: (OCT, 24),
696
770
  2021: (OCT, 14),
697
771
  2022: (OCT, 4),
@@ -1021,6 +1095,64 @@ class _HinduLunisolar:
1021
1095
  2035: (OCT, 2),
1022
1096
  }
1023
1097
 
1098
+ # https://www.timeanddate.com/holidays/nepal/sonam-losar
1099
+ # https://www.ashesh.com.np/nepali-calendar/
1100
+ SONAM_LOSAR_DATES = {
1101
+ 2010: (JAN, 16),
1102
+ 2011: (FEB, 4),
1103
+ 2012: (JAN, 24),
1104
+ 2013: (FEB, 11),
1105
+ 2014: (JAN, 31),
1106
+ 2015: (JAN, 21),
1107
+ 2016: (FEB, 9),
1108
+ 2017: (JAN, 28),
1109
+ 2018: (JAN, 18),
1110
+ 2019: (FEB, 5),
1111
+ 2020: (JAN, 25),
1112
+ 2021: (FEB, 12),
1113
+ 2022: (FEB, 2),
1114
+ 2023: (JAN, 22),
1115
+ 2024: (FEB, 10),
1116
+ 2025: (JAN, 30),
1117
+ 2026: (JAN, 19),
1118
+ 2027: (FEB, 7),
1119
+ 2028: (FEB, 26),
1120
+ 2029: (JAN, 15),
1121
+ 2030: (FEB, 3),
1122
+ 2031: (JAN, 24),
1123
+ 2032: (FEB, 12),
1124
+ 2033: (JAN, 31),
1125
+ 2034: (JAN, 21),
1126
+ 2035: (FEB, 9),
1127
+ }
1128
+
1129
+ # https://www.hamropatro.com/posts/articles-Bishesh-Dinharu/articles-Bishesh-Dinharu-english-tamu-lhosar
1130
+ TAMU_LOSAR_DATES = {
1131
+ 2010: (DEC, 30),
1132
+ 2011: (DEC, 30),
1133
+ 2012: (DEC, 30),
1134
+ 2013: (DEC, 30),
1135
+ 2014: (DEC, 30),
1136
+ 2015: (DEC, 30),
1137
+ 2016: (DEC, 30),
1138
+ 2017: (DEC, 30),
1139
+ 2018: (DEC, 30),
1140
+ 2019: (DEC, 31),
1141
+ 2020: (DEC, 30),
1142
+ 2021: (DEC, 30),
1143
+ 2022: (DEC, 30),
1144
+ 2023: (DEC, 31),
1145
+ 2024: (DEC, 30),
1146
+ 2025: (DEC, 30),
1147
+ 2026: (DEC, 30),
1148
+ 2027: (DEC, 30),
1149
+ 2028: (DEC, 30),
1150
+ 2029: (DEC, 30),
1151
+ 2030: (DEC, 31),
1152
+ 2031: (DEC, 31),
1153
+ 2032: (DEC, 30),
1154
+ }
1155
+
1024
1156
  THAIPUSAM_DATES = {
1025
1157
  1901: (MAR, 5),
1026
1158
  1902: (FEB, 23),
@@ -1306,6 +1438,9 @@ class _HinduLunisolar:
1306
1438
  def guru_nanak_jayanti_date(self, year: int) -> tuple[Optional[date], bool]:
1307
1439
  return self._get_holiday(GURU_NANAK_JAYANTI, year)
1308
1440
 
1441
+ def gyalpo_losar_date(self, year: int) -> tuple[Optional[date], bool]:
1442
+ return self._get_holiday(GYALPO_LOSAR, year)
1443
+
1309
1444
  def holi_date(self, year: int) -> tuple[Optional[date], bool]:
1310
1445
  return self._get_holiday(HOLI, year)
1311
1446
 
@@ -1315,6 +1450,9 @@ class _HinduLunisolar:
1315
1450
  def janmashtami_date(self, year: int) -> tuple[Optional[date], bool]:
1316
1451
  return self._get_holiday(JANMASHTAMI, year)
1317
1452
 
1453
+ def maha_ashtami_date(self, year: int) -> tuple[Optional[date], bool]:
1454
+ return self._get_holiday(MAHA_ASHTAMI, year)
1455
+
1318
1456
  def maha_navami_date(self, year: int) -> tuple[Optional[date], bool]:
1319
1457
  return self._get_holiday(MAHA_NAVAMI, year)
1320
1458
 
@@ -1339,6 +1477,12 @@ class _HinduLunisolar:
1339
1477
  def sharad_navratri_date(self, year: int) -> tuple[Optional[date], bool]:
1340
1478
  return self._get_holiday(SHARAD_NAVRATRI, year)
1341
1479
 
1480
+ def sonam_losar_date(self, year: int) -> tuple[Optional[date], bool]:
1481
+ return self._get_holiday(SONAM_LOSAR, year)
1482
+
1483
+ def tamu_losar_date(self, year: int) -> tuple[Optional[date], bool]:
1484
+ return self._get_holiday(TAMU_LOSAR, year)
1485
+
1342
1486
  def thaipusam_date(self, year: int) -> tuple[Optional[date], bool]:
1343
1487
  return self._get_holiday(THAIPUSAM, year)
1344
1488
 
holidays/constants.py CHANGED
@@ -39,7 +39,6 @@ HOLIDAY_NAME_DELIMITER = "; " # Holiday names separator.
39
39
 
40
40
  # Supported holiday categories.
41
41
  ARMED_FORCES = "armed_forces"
42
- ARMENIAN = "armenian"
43
42
  BANK = "bank"
44
43
  GOVERNMENT = "government"
45
44
  HALF_DAY = "half_day"
@@ -58,5 +57,13 @@ HINDU = "hindu"
58
57
  ISLAMIC = "islamic"
59
58
  ORTHODOX = "orthodox"
60
59
 
60
+ ALBANIAN = "albanian"
61
+ ARMENIAN = "armenian"
62
+ BOSNIAN = "bosnian"
63
+ ROMA = "roma"
64
+ SERBIAN = "serbian"
65
+ TURKISH = "turkish"
66
+ VLACH = "vlach"
67
+
61
68
  DEFAULT_START_YEAR = 1901
62
69
  DEFAULT_END_YEAR = 2100
@@ -13,6 +13,7 @@
13
13
  # flake8: noqa: F401
14
14
 
15
15
  from .afghanistan import Afghanistan, AF, AFG
16
+ from .aland_islands import AlandIslands, AX, ALA, HolidaysAX
16
17
  from .albania import Albania, AL, ALB
17
18
  from .algeria import Algeria, DZ, DZA
18
19
  from .american_samoa import AmericanSamoa, AS, ASM, HolidaysAS
@@ -32,10 +33,13 @@ from .barbados import Barbados, BB, BRB
32
33
  from .belarus import Belarus, BY, BLR
33
34
  from .belgium import Belgium, BE, BEL
34
35
  from .belize import Belize, BZ, BLZ
36
+ from .benin import Benin, BJ, BEN
37
+ from .bermuda import Bermuda, BM, BMU
35
38
  from .bolivia import Bolivia, BO, BOL
36
39
  from .bosnia_and_herzegovina import BosniaAndHerzegovina, BA, BIH
37
40
  from .botswana import Botswana, BW, BWA
38
41
  from .brazil import Brazil, BR, BRA
42
+ from .british_virgin_islands import BritishVirginIslands, VG, VGB
39
43
  from .brunei import Brunei, BN, BRN
40
44
  from .bulgaria import Bulgaria, BG, BLG
41
45
  from .burkina_faso import BurkinaFaso, BF, BFA
@@ -46,6 +50,7 @@ from .canada import Canada, CA, CAN
46
50
  from .chad import Chad, TD, TCD
47
51
  from .chile import Chile, CL, CHL
48
52
  from .china import China, CN, CHN
53
+ from .cocos_islands import CocosIslands, CC, CCK
49
54
  from .colombia import Colombia, CO, COL
50
55
  from .congo import Congo, CG, COG
51
56
  from .costa_rica import CostaRica, CR, CRI
@@ -61,6 +66,7 @@ from .dominican_republic import DominicanRepublic, DO, DOM
61
66
  from .ecuador import Ecuador, EC, ECU
62
67
  from .egypt import Egypt, EG, EGY
63
68
  from .el_salvador import ElSalvador, SV, SLV
69
+ from .equatorial_guinea import EquatorialGuinea, GQ, GNQ
64
70
  from .estonia import Estonia, EE, EST
65
71
  from .eswatini import Eswatini, SZ, SZW, Swaziland
66
72
  from .ethiopia import Ethiopia, ET, ETH
@@ -74,6 +80,7 @@ from .germany import Germany, DE, DEU
74
80
  from .ghana import Ghana, GH, GHA
75
81
  from .greece import Greece, GR, GRC
76
82
  from .greenland import Greenland, GL, GRL
83
+ from .grenada import Grenada, GD, GRD
77
84
  from .guam import Guam, GU, GUM, HolidaysGU
78
85
  from .guatemala import Guatemala, GT, GUA
79
86
  from .guernsey import Guernsey, GG, GGY
@@ -120,6 +127,7 @@ from .montenegro import Montenegro, ME, MNE
120
127
  from .morocco import Morocco, MA, MOR
121
128
  from .mozambique import Mozambique, MZ, MOZ
122
129
  from .namibia import Namibia, NA, NAM
130
+ from .nepal import Nepal, NP, NPL
123
131
  from .netherlands import Netherlands, NL, NLD
124
132
  from .new_zealand import NewZealand, NZ, NZL
125
133
  from .nicaragua import Nicaragua, NI, NIC
@@ -164,6 +172,7 @@ from .taiwan import Taiwan, TW, TWN
164
172
  from .tanzania import Tanzania, TZ, TZA
165
173
  from .thailand import Thailand, TH, THA
166
174
  from .timor_leste import TimorLeste, TL, TLS
175
+ from .togo import Togo, TG, TGO
167
176
  from .tonga import Tonga, TO, TON
168
177
  from .trinidad_and_tobago import TrinidadAndTobago, TT, TTO
169
178
  from .tunisia import Tunisia, TN, TUN
@@ -186,5 +195,6 @@ from .vanuatu import Vanuatu, VU, VTU
186
195
  from .vatican_city import VaticanCity, VA, VAT
187
196
  from .venezuela import Venezuela, VE, VEN
188
197
  from .vietnam import Vietnam, VN, VNM
198
+ from .yemen import Yemen, YE, YEM
189
199
  from .zambia import Zambia, ZM, ZMB
190
200
  from .zimbabwe import Zimbabwe, ZW, ZWE
@@ -0,0 +1,63 @@
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 CONTRIBUTORS 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.constants import PUBLIC, UNOFFICIAL, WORKDAY
14
+ from holidays.countries.finland import Finland
15
+
16
+
17
+ class HolidaysAX(Finland):
18
+ """Åland Islands holidays.
19
+
20
+ Alias of a Finnish subdivision that is also officially assigned
21
+ its own country code in ISO 3166-1.
22
+
23
+ !!! note "Note"
24
+ Åland's Autonomy Day is currently added in Finland's implementation.
25
+
26
+ References:
27
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_Åland>
28
+ * <https://en.wikipedia.org/wiki/Åland's_Autonomy_Day>
29
+ """
30
+
31
+ country = "AX"
32
+ parent_entity = Finland
33
+ default_language = "fi"
34
+ supported_languages = ("en_US", "fi", "sv_FI", "th", "uk")
35
+ supported_categories = (PUBLIC, UNOFFICIAL, WORKDAY)
36
+ subdivisions = () # Override Finland subdivisions.
37
+ subdivisions_aliases = {} # Override Finland subdivisions aliases.
38
+ # Åland Islands got its autonomy on May 7th, 1920.
39
+ start_year = 1921
40
+
41
+ def _populate_public_holidays(self) -> None:
42
+ self.subdiv = "01"
43
+ super()._populate_public_holidays()
44
+
45
+ def _populate_unofficial_holidays(self) -> None:
46
+ self.subdiv = "01"
47
+ super()._populate_unofficial_holidays()
48
+
49
+ def _populate_workday_holidays(self) -> None:
50
+ self.subdiv = "01"
51
+ super()._populate_workday_holidays()
52
+
53
+
54
+ class AlandIslands(HolidaysAX):
55
+ pass
56
+
57
+
58
+ class AX(HolidaysAX):
59
+ pass
60
+
61
+
62
+ class ALA(HolidaysAX):
63
+ pass
@@ -10,6 +10,9 @@
10
10
  # Website: https://github.com/vacanza/holidays
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
+ from gettext import gettext as tr
14
+
15
+ from holidays.constants import GOVERNMENT, PUBLIC
13
16
  from holidays.groups import ChristianHolidays, InternationalHolidays
14
17
  from holidays.holiday_base import HolidayBase
15
18
 
@@ -19,10 +22,63 @@ class Andorra(HolidayBase, ChristianHolidays, InternationalHolidays):
19
22
 
20
23
  References:
21
24
  * <https://en.wikipedia.org/wiki/Public_holidays_in_Andorra>
22
- * <https://www.holsdb.com/public-holidays/ad>
25
+ * [Andorra's Constitution](https://web.archive.org/web/20250506145838/https://www.bopa.ad/Legislacio/Detall?doc=7586)
26
+ * [Government holidays source](https://seu.consellgeneral.ad/calendariPublic/show)
27
+ * [2025](https://web.archive.org/web/20250506142149/https://www.bopa.ad/Documents/Detall?doc=GD_2024_10_24_14_36_16)
28
+
29
+ Subdivisions holidays:
30
+ * Canillo:
31
+ * [2020](https://web.archive.org/web/20250506143618/https://www.bopa.ad/Documents/Detall?doc=QCH20191209_09_01_14)
32
+ * [2021](https://web.archive.org/web/20250506143707/https://www.bopa.ad/Documents/Detall?doc=QCH20201130_11_52_35)
33
+ * [2022](https://web.archive.org/web/20250506143404/https://www.bopa.ad/Documents/Detall?doc=QCD20211126_12_16_57)
34
+ * [2023](https://web.archive.org/web/20250506143725/https://www.bopa.ad/Documents/Detall?doc=QCH20221010_11_26_39)
35
+ * [2024](https://web.archive.org/web/20250506143740/https://www.bopa.ad/Documents/Detall?doc=QCH_2023_12_06_16_16_52)
36
+ * [2025](https://web.archive.org/web/20250506144017/https://www.bopa.ad/Documents/Detall?doc=QCH_2024_10_10_11_42_15)
37
+ * Encamp:
38
+ * [2024](https://web.archive.org/web/20241201165207/https://www.bopa.ad/Documents/Detall?doc=QEH_2023_12_15_13_03_32)
39
+ * [2025](https://web.archive.org/web/20241212121414/https://www.bopa.ad/Documents/Detall?doc=QEH_2024_11_27_10_29_49)
40
+ * La Massana:
41
+ * [2020](https://web.archive.org/web/20250506144157/https://www.bopa.ad/Documents/Detall?doc=QMH20191209_09_08_10)
42
+ * [2021](https://web.archive.org/web/20250506144241/https://www.bopa.ad/Documents/Detall?doc=QMH20201218_11_52_59)
43
+ * [2022](https://web.archive.org/web/20250506144526/https://www.bopa.ad/Documents/Detall?doc=QMH20211116_12_23_19)
44
+ * [2023](https://web.archive.org/web/20250506144455/https://www.bopa.ad/Documents/Detall?doc=QMH20221216_12_41_13)
45
+ * [2024](https://web.archive.org/web/20250506144500/https://www.bopa.ad/Documents/Detall?doc=QMH_2023_12_11_10_54_27)
46
+ * [2025](https://web.archive.org/web/20250506144645/https://www.bopa.ad/Documents/Detall?doc=QMH_2024_11_19_09_10_48)
47
+ * Ordino:
48
+ * [2020](https://web.archive.org/web/20250506144555/https://www.bopa.ad/Documents/Detall?doc=QOH20191127_11_43_45)
49
+ * [2021](https://web.archive.org/web/20250506144713/https://www.bopa.ad/Documents/Detall?doc=QOH20201229_12_24_42)
50
+ * [2022](https://web.archive.org/web/20250506144715/https://www.bopa.ad/Documents/Detall?doc=QOH20211125_15_57_33)
51
+ * [2023](https://web.archive.org/web/20250506144738/https://www.bopa.ad/Documents/Detall?doc=QOH20221228_10_02_52)
52
+ * [2024](https://web.archive.org/web/20250506144729/https://www.bopa.ad/Documents/Detall?doc=QOH_2023_12_28_09_52_56)
53
+ * [2025](https://web.archive.org/web/20250506144815/https://www.bopa.ad/Documents/Detall?doc=QOH_2024_11_28_13_42_34)
54
+ * Sant Julià de Lòria:
55
+ * [2020](https://web.archive.org/web/20250506144715/https://www.bopa.ad/Documents/Detall?doc=QSH20191122_11_45_30)
56
+ * [2021](https://web.archive.org/web/20250506144827/https://www.bopa.ad/Documents/Detall?doc=QSH20201223_14_47_40)
57
+ * [2022](https://web.archive.org/web/20250506144843/https://www.bopa.ad/Documents/Detall?doc=QSH20211217_08_48_18)
58
+ * [2023](https://web.archive.org/web/20250506144859/https://www.bopa.ad/Documents/Detall?doc=QSH20221216_10_26_20)
59
+ * [2024](https://web.archive.org/web/20250506145411/https://www.bopa.ad/Documents/Detall?doc=QSH_2023_12_07_11_20_16)
60
+ * [2025](https://web.archive.org/web/20250506145311/https://www.bopa.ad/Documents/Detall?doc=QSH_2024_12_17_17_06_23)
61
+ * Andorra la Vella:
62
+ * [2020](https://web.archive.org/web/20250506142322/https://www.bopa.ad/Documents/Detall?doc=QAH20191128_08_58_08)
63
+ * [2021](https://web.archive.org/web/20250506142457/https://www.bopa.ad/Documents/Detall?doc=QAH20201210_11_13_19)
64
+ * [2022](https://web.archive.org/web/20250506142545/https://www.bopa.ad/Documents/Detall?doc=QAH20211111_16_06_47)
65
+ * [2023](https://web.archive.org/web/20250506142748/https://www.bopa.ad/Documents/Detall?doc=QAH20221117_10_31_45)
66
+ * [2024](https://web.archive.org/web/20250506142903/https://www.bopa.ad/Documents/Detall?doc=QAH_2023_11_17_12_40_42)
67
+ * [2025](https://web.archive.org/web/20250506143036/https://www.bopa.ad/Documents/Detall?doc=QAH_2024_11_21_09_44_47)
68
+ * Escaldes-Engordany:
69
+ * [Parish foundation](https://web.archive.org/web/20130409081302/http://www.andorra.ad/ca-ES/Andorra/Pagines/comu_escaldes.aspx)
70
+ * [2020](https://web.archive.org/web/20250506145337/https://www.bopa.ad/Documents/Detall?doc=QXH20200113_11_32_08)
71
+ * [2021](https://web.archive.org/web/20250506145439/https://www.bopa.ad/Documents/Detall?doc=QXH20210127_13_33_13)
72
+ * [2022](https://web.archive.org/web/20250506145442/https://www.bopa.ad/Documents/Detall?doc=QXH20220103_09_55_00)
73
+ * [2023](https://web.archive.org/web/20250506145436/https://www.bopa.ad/Documents/Detall?doc=QXH20230102_11_21_25)
74
+ * [2024](https://web.archive.org/web/20250506145940/https://www.bopa.ad/Documents/Detall?doc=QXH_2024_01_05_14_43_32)
75
+ * [2025](https://web.archive.org/web/20250506145955/https://www.bopa.ad/Documents/Detall?doc=QXH_2024_12_23_11_47_04)
23
76
  """
24
77
 
25
78
  country = "AD"
79
+ default_language = "ca"
80
+ # The 1933 Revolution in Andorra
81
+ start_year = 1934
26
82
  subdivisions = (
27
83
  "02", # Canillo.
28
84
  "03", # Encamp.
@@ -41,6 +97,8 @@ class Andorra(HolidayBase, ChristianHolidays, InternationalHolidays):
41
97
  "Andorra la Vella": "07",
42
98
  "Escaldes-Engordany": "08",
43
99
  }
100
+ supported_categories = (GOVERNMENT, PUBLIC)
101
+ supported_languages = ("ca", "en_US", "uk")
44
102
 
45
103
  def __init__(self, *args, **kwargs) -> None:
46
104
  ChristianHolidays.__init__(self)
@@ -49,93 +107,119 @@ class Andorra(HolidayBase, ChristianHolidays, InternationalHolidays):
49
107
 
50
108
  def _populate_public_holidays(self) -> None:
51
109
  # New Year's Day.
52
- self._add_new_years_day("New Year's Day")
110
+ self._add_new_years_day(tr("Cap d'Any"))
53
111
 
54
112
  # Epiphany.
55
- self._add_epiphany_day("Epiphany")
113
+ self._add_epiphany_day(tr("Reis"))
56
114
 
57
115
  # Carnival.
58
- self._add_carnival_tuesday("Carnival")
116
+ self._add_carnival_monday(tr("Carnaval"))
59
117
 
60
- # Constitution Day.
61
- self._add_holiday_mar_14("Constitution Day")
118
+ if self._year >= 1994:
119
+ # Constitution Day.
120
+ self._add_holiday_mar_14(tr("Dia de la Constitució"))
62
121
 
63
122
  # Good Friday.
64
- self._add_good_friday("Good Friday")
123
+ self._add_good_friday(tr("Divendres Sant"))
65
124
 
66
- # Easter Sunday.
67
- self._add_easter_monday("Easter Monday")
125
+ # Easter Monday.
126
+ self._add_easter_monday(tr("Dilluns de Pasqua"))
68
127
 
69
128
  # Labor Day.
70
- self._add_labor_day("Labor Day")
129
+ self._add_labor_day(tr("Festa del treball"))
71
130
 
72
131
  # Whit Monday.
73
- self._add_whit_monday("Whit Monday")
132
+ self._add_whit_monday(tr("Dilluns de Pentecosta"))
74
133
 
75
134
  # Assumption Day.
76
- self._add_assumption_of_mary_day("Assumption Day")
135
+ self._add_assumption_of_mary_day(tr("Assumpció"))
77
136
 
78
- # National Day.
79
- self._add_holiday_sep_8("National Day")
137
+ # Our Lady of Meritxell.
138
+ self._add_holiday_sep_8(tr("Nostra Senyora de Meritxell"))
80
139
 
81
140
  # All Saints' Day.
82
- self._add_all_saints_day("All Saints' Day")
141
+ self._add_all_saints_day(tr("Tots Sants"))
83
142
 
84
- # Immaculate Conception Day.
85
- self._add_immaculate_conception_day("Immaculate Conception Day")
143
+ # Immaculate Conception.
144
+ self._add_immaculate_conception_day(tr("Immaculada Concepció"))
86
145
 
87
146
  # Christmas Day.
88
- self._add_christmas_day("Christmas Day")
147
+ self._add_christmas_day(tr("Nadal"))
89
148
 
90
149
  # Saint Stephen's Day.
91
- self._add_christmas_day_two("Saint Stephen's Day")
150
+ self._add_christmas_day_two(tr("Sant Esteve"))
92
151
 
93
- # Canillo.
94
152
  def _populate_subdiv_02_public_holidays(self):
95
- name = "Canillo Annual Festival"
96
- self._add_holiday_3rd_sat_of_jul(name)
97
- self._add_holiday_1_day_past_3rd_sat_of_jul(name)
98
- self._add_holiday_2_days_past_3rd_sat_of_jul(name)
153
+ # Saint Roch's Day.
154
+ self._add_holiday_aug_16(tr("Sant Roc"))
99
155
 
100
- # Encamp.
101
156
  def _populate_subdiv_03_public_holidays(self):
102
- name = "Encamp Annual Festival"
103
- self._add_holiday_aug_15(name)
104
- self._add_holiday_aug_16(name)
157
+ # There are no holidays common to the whole parish.
158
+ pass
105
159
 
106
- # La Massana.
107
160
  def _populate_subdiv_04_public_holidays(self):
108
- name = "La Massana Annual Festival"
109
- self._add_holiday_aug_15(name)
110
- self._add_holiday_aug_16(name)
161
+ # Saint Anthony's Day.
162
+ self._add_holiday_jan_17(tr("Sant Antoni"))
111
163
 
112
- # Ordino.
113
164
  def _populate_subdiv_05_public_holidays(self):
114
- name = "Ordino Annual Festival"
115
- self._add_holiday_aug_15(name)
116
- self._add_holiday_aug_16(name)
165
+ # Saint Peter's Day.
166
+ self._add_saints_peter_and_paul_day(tr("Sant Pere"))
117
167
 
118
- # Sant Julià de Lòria.
119
168
  def _populate_subdiv_06_public_holidays(self):
120
- name = "Sant Julià de Lòria Annual Festival"
121
- self._add_holiday_1st_fri_before_jul_29(name)
122
- self._add_holiday_1st_sat_before_jul_30(name)
123
- self._add_holiday_1st_sun_before_jul_31(name)
124
- self._add_holiday_1st_mon_before_aug_1(name)
169
+ # Saint Julian's Day.
170
+ self._add_holiday_jan_7(tr("Sant Julià"))
171
+
172
+ # Virgin Mary of Canòlich.
173
+ self._add_holiday_last_sat_of_may(tr("Diada de Canòlich"))
174
+
175
+ # Sant Julià de Lòria Festival.
176
+ name = tr("Festa Major de Sant Julià de Lòria")
177
+ self._add_holiday_2_days_past_last_sat_of_jul(name)
178
+ self._add_holiday_3_days_past_last_sat_of_jul(name)
125
179
 
126
- # Andorra la Vella.
127
180
  def _populate_subdiv_07_public_holidays(self):
128
- name = "Andorra la Vella Annual Festival"
181
+ # Andorra la Vella Festival.
182
+ name = tr("Festa Major d'Andorra la Vella")
129
183
  self._add_holiday_1st_sat_of_aug(name)
130
184
  self._add_holiday_1_day_past_1st_sat_of_aug(name)
131
185
  self._add_holiday_2_days_past_1st_sat_of_aug(name)
132
186
 
133
- # Escaldes-Engordany.
134
187
  def _populate_subdiv_08_public_holidays(self):
135
- name = "Escaldes-Engordany Annual Festival"
188
+ # The parish of Escaldes-Engordany created on June 14, 1978.
189
+ if self._year <= 1978:
190
+ return None
191
+
192
+ # Saint Michael of Engolasters' Day.
193
+ self._add_holiday_may_7(tr("Sant Miquel d'Engolasters"))
194
+
195
+ # Parish foundation day.
196
+ name = tr("Diada de la creació de la parròquia")
197
+ if self._year >= 1997:
198
+ self._add_holiday_1st_sun_from_jun_14(name)
199
+ else:
200
+ self._add_holiday_jun_14(name)
201
+
202
+ # Escaldes-Engordany Festival.
203
+ name = tr("Festa Major d'Escaldes-Engordany")
136
204
  self._add_holiday_jul_25(name)
137
205
  self._add_holiday_jul_26(name)
138
206
 
207
+ def _populate_government_holidays(self):
208
+ # %s (from 1pm).
209
+ begin_time_label = self.tr("%s (a partir de les 13h)")
210
+
211
+ # Epiphany Eve.
212
+ self._add_holiday_jan_5(begin_time_label % self.tr("Vigília de Reis"))
213
+
214
+ # Maundy Thursday.
215
+ self._add_holy_thursday(begin_time_label % self.tr("Dijous Sant"))
216
+
217
+ # Christmas Eve.
218
+ self._add_christmas_eve(begin_time_label % self.tr("Vigília de Nadal"))
219
+
220
+ # New Year's Eve.
221
+ self._add_new_years_eve(begin_time_label % self.tr("Vigília de Cap d'Any"))
222
+
139
223
 
140
224
  class AD(Andorra):
141
225
  pass
@@ -36,8 +36,8 @@ class Angola(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
36
36
  * [Law #16/96](https://www.lexlink.eu/FileGet.aspx?FileId=3037036)
37
37
  * [Law #1/01](https://www.lexlink.eu/FileGet.aspx?FileId=3029035)
38
38
  * [Law #7/03](https://www.lexlink.eu/FileGet.aspx?FileId=3002131)
39
- * [Law #10/11](https://equadros.gov.ao/documents/40468/0/lei_10_11-1+%281%29.pdf)
40
- * [Law #11/18](https://equadros.gov.ao/documents/40468/0/Lei_no_11-18+%281%29.pdf)
39
+ * [Law #10/11](https://equadros.gov.ao/documents/40468/0/lei_10_11-1+(1).pdf)
40
+ * [Law #11/18](https://equadros.gov.ao/documents/40468/0/Lei_no_11-18+(1).pdf)
41
41
  * <https://www.officeholidays.com/countries/angola/>
42
42
  * <https://www.timeanddate.com/holidays/angola/>
43
43
  """