Skip to content

Commit a83692a

Browse files
authored
Merge branch 'dev' into dev
2 parents ea7c2db + 58c2d08 commit a83692a

40 files changed

+29757
-6
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,9 @@ Your PR description goes here.
3333
Put an `x` in the boxes that apply. You can change them after PR is created.
3434
-->
3535

36-
- [ ] I've followed the [contributing guidelines][contributing-guidelines]
37-
- [ ] I've successfully run `make check`, all checks and tests are green
36+
- [ ] I've read and followed the [contributing guidelines](https://github.com/vacanza/holidays/blob/dev/CONTRIBUTING.md).
37+
- [ ] I've run `make check` locally; all checks and tests passed.
3838

3939
<!--
4040
Thanks again for your contribution!
4141
-->
42-
43-
[contributing-guidelines]: https://github.com/vacanza/holidays/blob/dev/CONTRIBUTING.md
44-
[docs]: https://github.com/vacanza/holidays/tree/dev/docs/source

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ Sho Hirose
142142
Shreyansh Pande
143143
Shreyas Smarth
144144
Simon Gurcke
145+
Sindhura Kumbakonam Subramanian
145146
Sugato Ray
146147
Sylvain Pasche
147148
Sylvia van Os

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ and detailed information.
105105

106106
## Available Countries
107107

108-
We currently support 220 country codes. The standard way to refer to a country is by using its [ISO
108+
We currently support 222 country codes. The standard way to refer to a country is by using its [ISO
109109
3166-1 alpha-2 code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes), the same used
110110
for domain names, and for a subdivision its [ISO 3166-2
111111
code](https://en.wikipedia.org/wiki/ISO_3166-2). Some countries have common or foreign names or
@@ -385,6 +385,13 @@ any) in brackets, available languages and additional holiday categories. All cou
385385
<td></td>
386386
</tr>
387387
<tr>
388+
<td>Cabo Verde</td>
389+
<td>CV</td>
390+
<td>Municipalities: BR (Brava), BV (Boa Vista), CA (Santa Catarina), CF (Santa Catarina do Fogo), CR (Santa Cruz), MA (Maio), MO (Mosteiros), PA (Paul), PN (Porto Novo), PR (Praia), RB (Ribeira Brava), RG (Ribeira Grande), RS (Ribeira Grande de Santiago), SD (São Domingos), SF (São Filipe), SL (Sal), SM (São Miguel), SO (São Lourenço dos Órgãos), SS (São Salvador do Mundo), SV (São Vicente), TA (Tarrafal), TS (Tarrafal de São Nicolau)</td>
391+
<td>de, en_US, es, fr, <strong>pt_CV</strong></td>
392+
<td>OPTIONAL</td>
393+
</tr>
394+
<tr>
388395
<td>Cambodia</td>
389396
<td>KH</td>
390397
<td></td>
@@ -1162,6 +1169,13 @@ any) in brackets, available languages and additional holiday categories. All cou
11621169
<td></td>
11631170
</tr>
11641171
<tr>
1172+
<td>Niue</td>
1173+
<td>NU</td>
1174+
<td></td>
1175+
<td><strong>en_NU</strong>, en_US</td>
1176+
<td></td>
1177+
</tr>
1178+
<tr>
11651179
<td>Norfolk Island</td>
11661180
<td>NF</td>
11671181
<td></td>

holidays/countries/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
from holidays.countries.bulgaria import Bulgaria, BG, BLG
4747
from holidays.countries.burkina_faso import BurkinaFaso, BF, BFA
4848
from holidays.countries.burundi import Burundi, BI, BDI
49+
from holidays.countries.cabo_verde import CaboVerde, CV, CPV
4950
from holidays.countries.cambodia import Cambodia, KH, KHM
5051
from holidays.countries.cameroon import Cameroon, CM, CMR
5152
from holidays.countries.canada import Canada, CA, CAN
@@ -162,6 +163,7 @@
162163
from holidays.countries.nicaragua import Nicaragua, NI, NIC
163164
from holidays.countries.niger import Niger, NE, NER
164165
from holidays.countries.nigeria import Nigeria, NG, NGA
166+
from holidays.countries.niue import Niue, NU, NIU
165167
from holidays.countries.norfolk_island import NorfolkIsland, NF, NFK
166168
from holidays.countries.north_macedonia import NorthMacedonia, MK, MKD
167169
from holidays.countries.northern_mariana_islands import NorthernMarianaIslands, MP, MNP, HolidaysMP

holidays/countries/cabo_verde.py

Lines changed: 293 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,293 @@
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 <[email protected]> (c) 2017-2023
9+
# ryanss <[email protected]> (c) 2014-2017
10+
# Website: https://github.com/vacanza/holidays
11+
# License: MIT (see LICENSE file)
12+
13+
from gettext import gettext as tr
14+
15+
from holidays.constants import OPTIONAL, PUBLIC
16+
from holidays.groups import ChristianHolidays, InternationalHolidays
17+
from holidays.holiday_base import HolidayBase
18+
19+
20+
class CaboVerde(HolidayBase, ChristianHolidays, InternationalHolidays):
21+
"""Cabo Verde holidays.
22+
23+
References:
24+
* [Public holidays in Cape Verde](https://en.wikipedia.org/wiki/Public_holidays_in_Cape_Verde)
25+
* [Legislação Municipal Cabo-Verdiana](https://web.archive.org/web/20180820172827/http://www.interface.gov.cv/index.php?option=com_docman&task=doc_download&gid=12&Itemid=314)
26+
* [Feriados Bancários - Banco de Cabo Verde](https://web.archive.org/web/20250629042854/https://www.bcv.cv/pt/SistemadePagamentos/feriados_bancarios/Paginas/FeriadosBancarios.aspx)
27+
* [Feriados Públicos - Feel Cabo Verde](https://web.archive.org/web/20250419201823/https://feelcaboverde.com/feriados-publicos/)
28+
* [Public Holidays - Feel Cape Verde](https://web.archive.org/web/20250419202739/https://feelcaboverde.com/en/public-holidays-cape-verde/)
29+
* [Democracy Day](https://web.archive.org/web/20250420093850/https://cmsv.cv/dia-da-liberdade-e-democracia-de-cabo-verde/)
30+
"""
31+
32+
country = "CV"
33+
default_language = "pt_CV"
34+
start_year = 1976
35+
subdivisions = (
36+
"BR", # Brava.
37+
"BV", # Boa Vista.
38+
"CA", # Santa Catarina.
39+
"CF", # Santa Catarina do Fogo.
40+
"CR", # Santa Cruz.
41+
"MA", # Maio.
42+
"MO", # Mosteiros.
43+
"PA", # Paul.
44+
"PN", # Porto Novo.
45+
"PR", # Praia.
46+
"RB", # Ribeira Brava
47+
"RG", # Ribeira Grande.
48+
"RS", # Ribeira Grande de Santiago.
49+
"SD", # São Domingos.
50+
"SF", # São Filipe.
51+
"SL", # Sal.
52+
"SM", # São Miguel.
53+
"SO", # São Lourenço dos Órgãos.
54+
"SS", # São Salvador do Mundo.
55+
"SV", # São Vicente.
56+
"TA", # Tarrafal.
57+
"TS", # Tarrafal de São Nicolau.
58+
)
59+
60+
subdivisions_aliases = {
61+
"Brava": "BR",
62+
"Boa Vista": "BV",
63+
"Santa Catarina": "CA",
64+
"Santa Catarina do Fogo": "CF",
65+
"Santa Cruz": "CR",
66+
"Maio": "MA",
67+
"Mosteiros": "MO",
68+
"Paul": "PA",
69+
"Porto Novo": "PN",
70+
"Praia": "PR",
71+
"Ribeira Brava": "RB",
72+
"Ribeira Grande": "RG",
73+
"Ribeira Grande de Santiago": "RS",
74+
"São Domingos": "SD",
75+
"São Filipe": "SF",
76+
"Sal": "SL",
77+
"São Miguel": "SM",
78+
"São Lourenço dos Órgãos": "SO",
79+
"São Salvador do Mundo": "SS",
80+
"São Vicente": "SV",
81+
"Tarrafal": "TA",
82+
"Tarrafal de São Nicolau": "TS",
83+
}
84+
supported_categories = (OPTIONAL, PUBLIC)
85+
supported_languages = ("de", "en_US", "es", "fr", "pt_CV")
86+
87+
def __init__(self, *args, **kwargs) -> None:
88+
ChristianHolidays.__init__(self)
89+
InternationalHolidays.__init__(self)
90+
super().__init__(*args, **kwargs)
91+
92+
def _populate_public_holidays(self):
93+
# New Year's Day.
94+
self._add_new_years_day(tr("Ano Novo"))
95+
96+
# Law # 95/V/99 of March 22nd.
97+
if self._year >= 2000:
98+
# Democracy and Freedom Day.
99+
self._add_holiday_jan_13(tr("Dia da Liberdade e da Democracia"))
100+
101+
# National Heroes Day.
102+
self._add_holiday_jan_20(tr("Dia da Nacionalidade e dos Heróis Nacionais"))
103+
104+
# Ash Wednesday.
105+
self._add_ash_wednesday(tr("Quarta-feira de Cinzas"))
106+
107+
# Good Friday.
108+
self._add_good_friday(tr("Sexta-feira Santa"))
109+
110+
# Easter Sunday.
111+
self._add_easter_sunday(tr("Páscoa"))
112+
113+
# Worker's Day.
114+
self._add_labor_day(tr("Dia do Trabalhador"))
115+
116+
# Law # 69/VI/2005 of May 31st.
117+
if self._year >= 2005:
118+
# International Children's Day.
119+
self._add_childrens_day(tr("Dia Mundial da Criança"))
120+
121+
# Independence Day.
122+
self._add_holiday_jul_5(tr("Dia da Independência Nacional"))
123+
124+
# Assumption Day.
125+
self._add_assumption_of_mary_day(tr("Dia da Assunção"))
126+
127+
# All Saints' Day.
128+
self._add_all_saints_day(tr("Dia de Todos os Santos"))
129+
130+
# Christmas Day.
131+
self._add_christmas_day(tr("Dia do Natal"))
132+
133+
def _populate_optional_holidays(self):
134+
# Holy Thursday.
135+
self._add_holy_thursday(tr("Quinta-Feira Santa"))
136+
137+
# Mother's Day.
138+
self._add_holiday_2nd_sun_of_may(tr("Dia das Mães"))
139+
140+
# Father's Day.
141+
self._add_holiday_3rd_sun_of_jun(tr("Dia dos Pais"))
142+
143+
def _populate_subdiv_br_public_holidays(self):
144+
# Law # 93/82 of November 6th.
145+
if self._year >= 1983:
146+
# Brava Municipality Day.
147+
self._add_holiday_jun_24(tr("Dia do Município da Brava"))
148+
149+
def _populate_subdiv_bv_public_holidays(self):
150+
# Law # 93/82 of November 6th.
151+
if self._year >= 1983:
152+
# Boa Vista Municipality Day.
153+
self._add_holiday_jul_4(tr("Dia do Município da Boa Vista"))
154+
155+
def _populate_subdiv_ca_public_holidays(self):
156+
# Law # 93/82 of November 6th.
157+
if self._year >= 1982:
158+
# Santa Catarina de Santiago Municipality Day.
159+
self._add_holiday_nov_25(tr("Dia do Município de Santa Catarina de Santiago"))
160+
161+
def _populate_subdiv_cf_public_holidays(self):
162+
# Law # 66/VI/2005 of May 9th.
163+
if self._year >= 2005:
164+
# Santa Catarina do Fogo Municipality Day.
165+
self._add_holiday_nov_25(tr("Dia do Município de Santa Catarina do Fogo"))
166+
167+
def _populate_subdiv_cr_public_holidays(self):
168+
# Law # 93/82 of November 6th.
169+
if self._year >= 1983:
170+
# Santa Cruz Municipality Day.
171+
self._add_holiday_jul_25(tr("Dia do Município de Santa Cruz"))
172+
173+
def _populate_subdiv_ma_public_holidays(self):
174+
# Law # 93/82 of November 6th.
175+
if self._year >= 1983:
176+
# Maio Municipality Day.
177+
self._add_holiday_sep_8(tr("Dia do Município do Maio"))
178+
179+
def _populate_subdiv_mo_public_holidays(self):
180+
# Law # 23/IV/91 of December 30th.
181+
if self._year >= 1992:
182+
# Mosteiros Municipality Day.
183+
self._add_holiday_aug_15(tr("Dia do Município dos Mosteiros"))
184+
185+
def _populate_subdiv_pa_public_holidays(self):
186+
# Law # 93/82 of November 6th.
187+
if self._year >= 1983:
188+
# Santo Antão Island Day.
189+
self._add_holiday_jan_17(tr("Dia da Ilha de Santo Antão"))
190+
191+
# Paúl Municipality Day.
192+
self._add_holiday_jun_13(tr("Dia do Município do Paúl"))
193+
194+
def _populate_subdiv_pn_public_holidays(self):
195+
# Law # 93/82 of November 6th.
196+
if self._year >= 1983:
197+
# Santo Antão Island Day.
198+
self._add_holiday_jan_17(tr("Dia da Ilha de Santo Antão"))
199+
200+
# Porto Novo Municipality Day.
201+
self._add_holiday_sep_2(tr("Dia do Município do Porto Novo"))
202+
203+
def _populate_subdiv_pr_public_holidays(self):
204+
# Law # 93/82 of November 6th.
205+
if self._year >= 1983:
206+
# Praia Municipality Day.
207+
self._add_holiday_may_19(tr("Dia do Município da Praia"))
208+
209+
def _populate_subdiv_rb_public_holidays(self):
210+
# Law # 67/VI/2005 of May 9th.
211+
if self._year >= 2005:
212+
# Ribeira Brava Municipality Day.
213+
self._add_holiday_dec_6(tr("Dia do Município de Ribeira Brava"))
214+
215+
def _populate_subdiv_rg_public_holidays(self):
216+
# Law # 93/82 of November 6th.
217+
if self._year >= 1983:
218+
# Santo Antão Island Day.
219+
self._add_holiday_jan_17(tr("Dia da Ilha de Santo Antão"))
220+
221+
# Ribeira Grande Municipality Day.
222+
self._add_holiday_may_7(tr("Dia do Município de Ribeira Grande"))
223+
224+
def _populate_subdiv_rs_public_holidays(self):
225+
# Law # 63/VI/2005 of May 9th.
226+
if self._year >= 2006:
227+
# Ribeira Grande de Santiago Municipality Day.
228+
self._add_holiday_jan_31(tr("Dia do Município de Ribeira Grande de Santiago"))
229+
230+
def _populate_subdiv_sd_public_holidays(self):
231+
# Law # 96/IV/93 of December 31st.
232+
if self._year >= 1994:
233+
# São Domingos Municipality Day.
234+
self._add_holiday_mar_13(tr("Dia do Município de São Domingos"))
235+
236+
def _populate_subdiv_sf_public_holidays(self):
237+
# Law # 23/IV/91 of December 30th.
238+
if self._year >= 1992:
239+
# São Filipe Municipality Day.
240+
self._add_holiday_may_1(tr("Dia do Município de São Filipe"))
241+
242+
def _populate_subdiv_sl_public_holidays(self):
243+
# Law # 93/82 of November 6th.
244+
if self._year >= 1983:
245+
# Sal Municipality Day.
246+
self._add_holiday_sep_15(tr("Dia do Município do Sal"))
247+
248+
def _populate_subdiv_sm_public_holidays(self):
249+
# Law # 11/V/96 of November 11th.
250+
if self._year >= 1997:
251+
# São Miguel Municipality Day.
252+
self._add_holiday_sep_29(tr("Dia do Município de São Miguel"))
253+
254+
def _populate_subdiv_so_public_holidays(self):
255+
# Law # 64/VI/2005 of May 9th.
256+
if self._year >= 2005:
257+
# São Lourenço dos Órgãos Municipality Day.
258+
self._add_holiday_may_9(tr("Dia do Município de São Lourenço dos Órgãos"))
259+
260+
def _populate_subdiv_ss_public_holidays(self):
261+
# Law # 65/VI/2005 of May 9th.
262+
if self._year >= 2005:
263+
# São Salvador do Mundo Municipality Day.
264+
self._add_holiday_jul_19(tr("Dia do Município de São Salvador do Mundo"))
265+
266+
def _populate_subdiv_sv_public_holidays(self):
267+
# Law # 93/82 of November 6th.
268+
if self._year >= 1983:
269+
# São Vicente Municipality Day.
270+
self._add_holiday_jan_22(tr("Dia do Município de São Vicente"))
271+
272+
# Carnival Tuesday.
273+
self._add_carnival_tuesday(tr("Terça-feira de Carnaval"))
274+
275+
def _populate_subdiv_ta_public_holidays(self):
276+
# Law # 93/82 of November 6th.
277+
if self._year >= 1983:
278+
# Tarrafal de Santiago Municipality Day.
279+
self._add_holiday_jan_15(tr("Dia do Município do Tarrafal de Santiago"))
280+
281+
def _populate_subdiv_ts_public_holidays(self):
282+
# Law # 67/VI/2005 of May 9th.
283+
if self._year >= 2005:
284+
# Tarrafal de São Nicolau Municipality Day.
285+
self._add_holiday_aug_2(tr("Dia do Município do Tarrafal de São Nicolau"))
286+
287+
288+
class CV(CaboVerde):
289+
pass
290+
291+
292+
class CPV(CaboVerde):
293+
pass

0 commit comments

Comments
 (0)