+
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ Serhii Murza
Shaurya Uppal
Sho Hirose
Simon Gurcke
Sindhura Kumbakonam Subramanian
Sugato Ray
Sylvain Pasche
Sylvia van Os
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ and detailed information.

## Available Countries

We currently support 163 country codes. The standard way to refer to a country is by using its [ISO
We currently support 164 country codes. The standard way to refer to a country is by using its [ISO
3166-1 alpha-2 code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes), the same used
for domain names, and for a subdivision its [ISO 3166-2
code](https://en.wikipedia.org/wiki/ISO_3166-2). Some countries have common or foreign names or
Expand Down Expand Up @@ -358,6 +358,13 @@ any) in brackets, available languages and additional holiday categories. All cou
<td>GOVERNMENT, OPTIONAL</td>
</tr>
<tr>
<td>Cape Verde</td>
<td>CV</td>
<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>
<td>de, en_US, es, fr, <strong>pt_CV</strong></td>
<td>OPTIONAL</td>
</tr>
<tr>
<td>Chad</td>
<td>TD</td>
<td></td>
Expand Down
1 change: 1 addition & 0 deletions holidays/countries/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
from .cambodia import Cambodia, KH, KHM
from .cameroon import Cameroon, CM, CMR
from .canada import Canada, CA, CAN
from .cape_verde import CapeVerde, CV, CAV
from .chad import Chad, TD, TCD
from .chile import Chile, CL, CHL
from .china import China, CN, CHN
Expand Down
191 changes: 191 additions & 0 deletions holidays/countries/cape_verde.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
# holidays
# --------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
# Website: https://github.com/vacanza/holidays
# License: MIT (see LICENSE file)

from gettext import gettext as tr

from holidays.constants import OPTIONAL, PUBLIC
from holidays.groups import ChristianHolidays, InternationalHolidays
from holidays.holiday_base import HolidayBase


class CapeVerde(HolidayBase, ChristianHolidays, InternationalHolidays):
"""Cape Verde holidays.
References:
* [Public holidays in Cape Verde](https://en.wikipedia.org/wiki/Public_holidays_in_Cape_Verde)
* [Today's and Upcoming Holidays in Cape Verde](https://www.timeanddate.com/holidays/cape-verde/)
* [Democracy Day](https://www.officeholidays.com/holidays/cape-verde/cape-verde-democracy-day)
* [National Heroes Day](https://www.officeholidays.com/holidays/cape-verde/guinea-bissau-national-heroes-day)
* [Feriados Bancários - Banco de Cabo Verde](https://www.bcv.cv/pt/SistemadePagamentos/feriados_bancarios/Paginas/FeriadosBancarios.aspx)
* [Feriados Públicos - Feel Cabo Verde](https://feelcaboverde.com/feriados-publicos/)
* [Public Holidays - Feel Cape Verde](https://feelcaboverde.com/en/public-holidays-cape-verde/)
* [List of Cape Verde's subdivision ISO codes](https://www.iso.org/obp/ui/#iso:code:3166:CV)
"""

country = "CV"
default_language = "pt_CV"
start_year = 1976
subdivisions = (
# 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.
)
subdivisions_aliases = {
# Municipalities.
"Brava": "BR",
"Boa Vista": "BV",
"Santa Catarina": "CA",
"Santa Catarina do Fogo": "CF",
"Santa Cruz": "CR",
"Maio": "MA",
"Mosteiros": "MO",
"Paul": "PA",
"Porto Novo": "PN",
"Praia": "PR",
"Ribeira Brava": "RB",
"Ribeira Grande": "RG",
"Ribeira Grande de Santiago": "RS",
"São Domingos": "SD",
"São Filipe": "SF",
"Sal": "SL",
"São Miguel": "SM",
"São Lourenço dos Órgãos": "SO",
"São Salvador do Mundo": "SS",
"São Vicente": "SV",
"Tarrafal": "TA",
"Tarrafal de São Nicolau": "TS",
}
supported_categories = (OPTIONAL, PUBLIC)
supported_languages = ("de", "en_US", "es", "fr", "pt_CV")

def __init__(self, *args, **kwargs) -> None:
ChristianHolidays.__init__(self)
InternationalHolidays.__init__(self)
super().__init__(*args, **kwargs)

def _populate_public_holidays(self):
# New Year's Day.
self._add_new_years_day(tr("Ano Novo"))

if self._year >= 1991:
# Democracy and Freedom Day.
self._add_holiday_jan_13(tr("Dia da Liberdade e Democracia"))

# National Heroes Day.
self._add_holiday_jan_20(tr("Dia da Nacionalidade e dos Heróis Nacionais"))

# Ash Wednesday.
self._add_ash_wednesday(tr("Quarta-feira de Cinzas"))

# Good Friday.
self._add_good_friday(tr("Sexta-feira Santa"))

# Easter Sunday.
self._add_easter_sunday(tr("Páscoa"))

# Worker's Day.
self._add_labor_day(tr("Dia do Trabalhador"))

# International Children's Day.
self._add_childrens_day(tr("Dia Mundial da Criança"))

# Independence Day.
self._add_holiday_jul_5(tr("Dia da Independência Nacional"))

# Assumption Day.
self._add_assumption_of_mary_day(tr("Dia da Assunção"))

# All Saints' Day.
self._add_all_saints_day(tr("Dia de Todos os Santos"))

# Christmas Day.
self._add_christmas_day(tr("Natal"))

def _populate_optional_holidays(self):
# Holy Thursday.
self._add_holy_thursday(tr("Quinta-Feira Santa"))

# Mother's Day.
self._add_holiday_2nd_sun_of_may(tr("Dia das Mães"))

# Father's Day.
self._add_holiday_3rd_sun_of_jun(tr("Dia dos Pais"))

def _populate_subdiv_br_public_holidays(self):
# Brava Municipal Day.
self._add_holiday_jun_24(tr("Dia do Município da Brava"))

def _populate_subdiv_bv_public_holidays(self):
# Municipal Day.
self._add_holiday_jul_4(tr("Dia do Município"))

def _populate_subdiv_ma_public_holidays(self):
# Maio Municipal Day.
self._add_holiday_sep_8(tr("Dia do Município do Maio"))

def _populate_subdiv_pr_public_holidays(self):
# Praia City Day.
self._add_holiday_apr_29(tr("Dia da Cidade da Praia"))
Comment on lines +156 to +157
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the name, this is holiday of Praia city, not the entire municipality.


# Praia Municipal Day.
self._add_holiday_may_19(tr("Dia do Município da Praia"))

def _populate_subdiv_rb_public_holidays(self):
# Ribeira Brava Municipal Day.
self._add_holiday_dec_6(tr("Dia do Município de Ribeira Brava"))

def _populate_subdiv_rs_public_holidays(self):
# Ribeira Grande de Santiago Municipal Day.
self._add_holiday_jan_31(tr("Dia do Município de Ribeira Grande de Santiago"))

def _populate_subdiv_sl_public_holidays(self):
# Municipal Day.
self._add_holiday_sep_15(tr("Dia do Município"))

def _populate_subdiv_sv_public_holidays(self):
# São Vicente Municipal Day.
self._add_holiday_jan_22(tr("Dia do Município de São Vicente"))

# Carnival Tuesday.
self._add_carnival_tuesday(tr("Terça-feira de Carnaval"))

def _populate_subdiv_ts_public_holidays(self):
# Tarrafal de São Nicolau Municipal Day.
self._add_holiday_aug_2(tr("Dia do Município do Tarrafal de São Nicolau"))


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to Feriados Públicos page, there are also holidays:

  • May 7 - Dia do Município de Ribeira Grande
  • Jun 13 - Dia do Município de Paúl
  • Sep 2 - Dia do Município do Porto Novo
  • Jan 17 - Dia da ilha de Santo Antão (for municipalities on this island - Ribeira Grande, Paúl, Porto Novo)
  • Jan 15 - Dia do Município de Tarrafal de Santiago
  • Mar 13 - Dia do Município de São Domingos
  • May 9 - Dia do Município de São Lourenço dos Órgãos
  • Jul 19 - Dia do Município de São Salvador do Mundo
  • Jul 25 - Dia do Município de Santa Cruz
  • Sep 29 - Dia do Município de São Miguel
  • Nov 25 - Dia do Município de Santa Catarina de Santiago, Dia do Município de Santa Catarina do Fogo
  • May 1 - Dia do Município de São Filipe
  • Aug 15 - Dia do Município dos Mosteiros

According to Legislação Municipal Cabo-Verdiana:

  • São Salvador do Mundo was created in 2005 - Lei nº 65/VI/2005
  • Tarrafal de São Nicolau and Ribeira Brava was created in 2005 - Lei nº 67/VI/2005
  • São Domingos was created in 1994 - Lei nº 96/IV/93
  • São Lourenço dos Órgãos was created in 2005 - Lei nº 64/VI/2005
  • Ribeira Grande de Santiago was created in 2005 - Lei nº 63/VI/2005
  • São Miguel was created in 1996 - Lei nº 11/V/96
  • Mosteiros and São Filipe was created in 1992 - Lei nº 23/IV/91
  • Santa Catarina do Fogo was created in 2005 - Lei nº 66/VI/2005

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following holidays are placed under the corresponding subdivision:

  • Dia do Município de Ribeira Grande under _populate_subdiv_rs_public_holidays

The others are found under Santiago for which there is no municipality code although the holidays listed under it have appropriate municipality codes in https://www.iso.org/obp/ui/#iso:code:3166:CV

For certain holidays such as Dia do Município de São Lourenço dos Órgãos, Dia da ilha de Santo Antão, Dia do Município de São Salvador do Mundo the municipality codes were not found here https://www.iso.org/obp/ui/#iso:code:3166:CV.

KIndly confirm on how to proceed further.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The others are found under Santiago for which there is no municipality code although the holidays listed under it have appropriate municipality codes in https://www.iso.org/obp/ui/#iso:code:3166:CV

Santiago is the island where they are located.

For certain holidays such as Dia do Município de São Lourenço dos Órgãos,

"SO", # São Lourenço dos Órgãos.

Dia da ilha de Santo Antão

Jan 17 - Dia da ilha de Santo Antão (for municipalities on this island - Ribeira Grande, Paúl, Porto Novo)

Dia do Município de São Salvador do Mundo

"SS", # São Salvador do Mundo.

class CV(CapeVerde):
pass


class CAV(CapeVerde):
pass
127 changes: 127 additions & 0 deletions holidays/locale/de/LC_MESSAGES/CV.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# holidays
# --------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
# Website: https://github.com/vacanza/holidays
# License: MIT (see LICENSE file)
#
# Cape Verde holidays de localization.
#
msgid ""
msgstr ""
"Project-Id-Version: Holidays 0.70\n"
"POT-Creation-Date: 2025-04-01 13:02-0400\n"
"PO-Revision-Date: 2025-04-01 13:02-0400\n"
"Last-Translator: Sindhura Kumbakonam Subramanian <sindhu.ss10@gmail.com>\n"
"Language-Team: Holidays Localization Team\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Lingva 5.0.5\n"
"X-Source-Language: pt_CV\n"

#. New Year's Day.
msgid "Ano Novo"
msgstr "Neujahr"

#. Democracy and Freedom Day.
msgid "Dia da Liberdade e Democracia"
msgstr "Tag der Demokratie und Freiheit"

#. National Heroes Day.
msgid "Dia da Nacionalidade e dos Heróis Nacionais"
msgstr "Tag der Nationalhelden"

#. Good Friday.
msgid "Sexta-feira Santa"
msgstr "Karfreitag"

#. Worker's Day.
msgid "Dia do Trabalhador"
msgstr "Tag der Arbeit"

#. International Children's Day.
msgid "Dia Mundial da Criança"
msgstr "Weltkindertag"

#. Independence Day.
msgid "Dia da Independência Nacional"
msgstr "Nationaler Unabhängigkeitstag"

#. Assumption Day.
msgid "Dia da Assunção"
msgstr "Mariä Himmelfahrt"

#. All Saints' Day.
msgid "Dia de Todos os Santos"
msgstr "Allerheiligen"

#. Christmas Day.
msgid "Natal"
msgstr "Weihnachten"

#. Holy Thursday.
msgid "Quinta-Feira Santa"
msgstr "Gründonnerstag"

#. Easter Sunday.
msgid "Páscoa"
msgstr "Ostern"

#. Mother's Day.
msgid "Dia das Mães"
msgstr "Muttertag"

#. Father's Day.
msgid "Dia dos Pais"
msgstr "Vatertag"

#. Ash Wednesday.
msgid "Quarta-feira de Cinzas"
msgstr "Aschermittwoch"

#. Carnival Tuesday.
msgid "Terça-feira de Carnaval"
msgstr "Karnevalsdienstag"

#. São Vicente Municipal Day.
msgid "Dia do Município de São Vicente"
msgstr "Tag der Gemeinde São Vicente"

#. Tarrafal de São Nicolau Municipal Day.
msgid "Dia do Município do Tarrafal de São Nicolau"
msgstr "Tag der Gemeinde Tarrafal de São Nicolau"

#. Ribeira Brava Municipal Day.
msgid "Dia do Município de Ribeira Brava"
msgstr "Tag der Gemeinde Ribeira Brava"

#. Municipal Day.
msgid "Dia do Município"
msgstr "Gemeindetag"

#. Maio Municipal Day.
msgid "Dia do Município do Maio"
msgstr "Tag der Gemeinde Maio"

#. Ribeira Grande de Santiago Municipal Day.
msgid "Dia do Município de Ribeira Grande de Santiago"
msgstr "Tag der Gemeinde Ribeira Grande de Santiago"

#. Brava Municipal Day.
msgid "Dia do Município da Brava"
msgstr "Tag der Gemeinde Brava"

#. Praia City Day.
msgid "Dia da Cidade da Praia"
msgstr "Praia-Stadttag"

#. Praia Municipal Day.
msgid "Dia do Município da Praia"
msgstr "Tag der Gemeinde Praia"
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载