-
-
Notifications
You must be signed in to change notification settings - Fork 558
Add Cape Verde holidays #2394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Cape Verde holidays #2394
Changes from all commits
8695038
2d2f9db
fa1baa0
281817d
7328522
a6d80ab
f92f9a8
ef2d6dd
882c6be
e88f25e
1be5118
51833c9
91a7778
2a60869
4cbe33b
1558977
3ca9a8b
080d3dd
1a130c1
900393c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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: | ||
PPsyrius marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* [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 | ||
PPsyrius marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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")) | ||
PPsyrius marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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")) | ||
KJhellico marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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")) | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to Feriados Públicos page, there are also holidays:
According to Legislação Municipal Cabo-Verdiana:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The following holidays are placed under the corresponding subdivision:
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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Santiago is the island where they are located.
|
||
class CV(CapeVerde): | ||
pass | ||
|
||
|
||
class CAV(CapeVerde): | ||
pass |
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" |
Uh oh!
There was an error while loading. Please reload this page.