Skip to content

Commit 4d33d07

Browse files
authored
Update Vatican City holidays: add missing holidays, l10n support (vacanza#2250)
1 parent a994e8d commit 4d33d07

8 files changed

Lines changed: 2983 additions & 930 deletions

File tree

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ All other default values are highlighted with bold:
938938
* - Vatican City
939939
- VA
940940
-
941-
-
941+
- en_US, **it**, th
942942
-
943943
* - Venezuela
944944
- VE

holidays/countries/vatican_city.py

Lines changed: 134 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -10,105 +10,186 @@
1010
# Website: https://github.com/vacanza/holidays
1111
# License: MIT (see LICENSE file)
1212

13-
from holidays.groups import ChristianHolidays
13+
from gettext import gettext as tr
14+
15+
from holidays.groups import ChristianHolidays, InternationalHolidays
1416
from holidays.holiday_base import HolidayBase
1517

1618

17-
class VaticanCity(HolidayBase, ChristianHolidays):
19+
class VaticanCity(HolidayBase, ChristianHolidays, InternationalHolidays):
1820
"""
1921
References:
22+
- https://www.vatican.va/roman_curia/labour_office/docs/documents/ulsa_b18_7_it.html
23+
- https://cdn.restorethe54.com/media/pdf/1917-code-of-canon-law-english.pdf
24+
- https://www.vatican.va/archive/cod-iuris-canonici/eng/documents/cic_lib4-cann1244-1253_en.html
2025
- https://en.wikipedia.org/wiki/Public_holidays_in_Vatican_City
26+
- https://en.wikipedia.org/wiki/Holy_day_of_obligation
2127
- https://www.ewtn.com/catholicism/library/solemnity-of-mary-mother-of-god-5826
2228
- https://www.franciscanmedia.org/saint-of-the-day/saint-joseph-the-worker/
29+
30+
Cross-checked With:
31+
- https://www.vaticanstate.va/images/pdf/CALENDARIO_2020.pdf
32+
- https://www.farmaciavaticana.va/images/pdf/calendario_2021.pdf
33+
- https://www.farmaciavaticana.va/images/pdf/calendario_2022.pdf
34+
- https://www.farmaciavaticana.va/images/pdf/calendario_2023.pdf
35+
- https://www.farmaciavaticana.va/media/attachments/2024/01/02/calendario_2024.pdf
36+
- https://www.farmaciavaticana.va/media/attachments/2025/01/02/calendario-2025.pdf
2337
"""
2438

2539
country = "VA"
40+
default_language = "it"
41+
supported_languages = ("en_US", "it", "th")
42+
# Lateran Treaty, FEB 11, 2029.
2643
start_year = 1929
2744

2845
def __init__(self, *args, **kwargs) -> None:
2946
ChristianHolidays.__init__(self)
47+
InternationalHolidays.__init__(self)
3048
super().__init__(*args, **kwargs)
3149

3250
def _populate_public_holidays(self) -> None:
33-
# Solemnity of Mary Day.
3451
# This is supposedly the same as International New Year.
3552
# Modern adoption across the entire Latin Church in 1931 though this
3653
# was already celebrated in Rome as the Octave day of Christmas.
37-
self._add_holiday_jan_1("Solemnity of Mary Day")
54+
55+
# Solemnity of Mary, Mother of God.
56+
self._add_holiday_jan_1(tr("Solennità di Maria Santissima Madre di Dio"))
3857

3958
# Epiphany.
40-
self._add_epiphany_day("Epiphany")
41-
42-
# Lateran Treaty Day.
43-
self._add_holiday_feb_11("Lateran Treaty Day")
44-
45-
if self._year >= 1978:
46-
name = "Anniversary of the Election of the Holy Father"
47-
if self._year >= 2013:
48-
# Anniversary of the election of Pope Francis.
49-
self._add_holiday_mar_13(name)
50-
elif self._year >= 2005:
51-
# Anniversary of the election of Pope Benedict XVI.
52-
self._add_holiday_apr_19(name)
53-
else:
54-
# Anniversary of the election of Pope John Paul II.
55-
self._add_holiday_oct_16(name)
56-
57-
# In 2005-2013 - also name day for the civilian name of
58-
# Pope Benedict XVI (Josef Ratzinger)
59+
self._add_epiphany_day(tr("Epifania del Signore"))
60+
61+
self._add_holiday_feb_11(
62+
# Anniversary of the Foundation of Vatican City.
63+
tr("Anniversario della istituzione dello Stato della Città del Vaticano")
64+
)
65+
66+
# Anniversary of the Election of the Holy Father.
67+
name_election = tr("Anniversario dell'Elezione del Santo Padre")
68+
69+
# Name Day of the Holy Father.
70+
name_day = tr("Onomastico del Santo Padre")
71+
72+
if self._year >= 2013:
73+
# Pope Francis (Jorge Mario Bergoglio).
74+
# Name Day: Saint George's Day (APR 23).
75+
self._add_holiday_mar_13(name_election)
76+
self._add_saint_georges_day(name_day)
77+
elif self._year >= 2005:
78+
# Pope Benedict XVI (Josef Aloisius Ratzinger).
79+
# Name Day: Saint Joseph's Day (MAR 19).
80+
self._add_holiday_apr_19(name_election)
81+
self._add_saint_josephs_day(name_day)
82+
elif self._year >= 1978:
83+
# Pope John Paul II (Karol Józef Wojtyła).
84+
# Name Day: Saint Charles Borromeo Day (NOV 4).
85+
self._add_holiday_oct_16(name_election)
86+
self._add_holiday_nov_4(name_day)
87+
88+
if self._year == 1978:
89+
# Pope John Paul I (Albino Luciani).
90+
# Name Day: Saint Albinus of Angers (MAR 1)?
91+
self._add_holiday_aug_26(name_election)
92+
93+
# Pope Paul VI (cont.).
94+
self._add_holiday_jun_21(name_election)
95+
elif self._year >= 1963:
96+
# Pope Paul VI (Giovanni Battista Enrico Antonio Maria Montini).
97+
# Name Day: Saint John's Day (JUN 24)?
98+
self._add_holiday_jun_21(name_election)
99+
elif self._year >= 1958:
100+
# Pope John XXIII (Angelo Giuseppe Roncalli).
101+
# Name Day: Saint Angelus of Jerusalem (MAY 5)?
102+
self._add_holiday_oct_28(name_election)
103+
104+
if self._year == 1958:
105+
# Pope Pius XII (cont.).
106+
self._add_holiday_mar_2(name_election)
107+
elif self._year >= 1939:
108+
# Pope Pius XII (Eugenio Maria Giuseppe Giovanni Pacelli).
109+
# Name Day: Saint Eugene (JUN 2)?
110+
self._add_holiday_mar_2(name_election)
111+
112+
if self._year == 1939:
113+
# Pope Pius XI (cont.).
114+
self._add_holiday_feb_6(name_election)
115+
else:
116+
# Pope Pius XI (Achille Ambrogio Damiano Ratti).
117+
# Name Day: Saint Nereus and Achilleus (MAY 12)?
118+
self._add_holiday_feb_6(name_election)
119+
59120
# Saint Joseph's Day.
60-
self._add_saint_josephs_day("Saint Joseph's Day")
121+
self._add_saint_josephs_day(tr("San Giuseppe"))
122+
123+
# Maundy Thursday.
124+
self._add_holy_thursday(tr("Giovedì Santo"))
125+
126+
# Good Friday.
127+
self._add_good_friday(tr("Venerdì Santo"))
128+
129+
# Holy Saturday.
130+
self._add_holy_saturday(tr("Sabato Santo"))
61131

62132
# Easter Sunday.
63-
self._add_easter_sunday("Easter Sunday")
133+
self._add_easter_sunday(tr("Pasqua di Resurrezione"))
64134

65135
# Easter Monday.
66-
self._add_easter_monday("Easter Monday")
136+
self._add_easter_monday(tr("Lunedì dell'Angelo"))
67137

68-
if self._year >= 2013:
69-
# Name day for the civilian name of Pope Francis
70-
# (Jorge Mario Bergoglio)
71-
# Saint George's Day.
72-
self._add_saint_georges_day("Saint George's Day")
138+
# Easter Tuesday.
139+
self._add_easter_tuesday(tr("Martedì in Albis"))
73140

141+
# Created in response to May Day holidays by Pope Pius XII in 1955.
74142
if self._year >= 1955:
75-
# Saint Joseph the Worker's Day.
76-
# Created in response to May Day holidays by Pope Pius XII in 1955.
77-
self._add_holiday_may_1("Saint Joseph the Worker's Day")
143+
# Saint Joseph the Worker.
144+
self._add_holiday_may_1(tr("San Giuseppe Artigiano"))
145+
146+
# Solemnity of Pentecost.
147+
self._add_whit_sunday(tr("Solennità della Pentecoste"))
148+
149+
# Solemnity of Holy Trinity.
150+
self._add_trinity_sunday(tr("Solennità della Santissima Trinità"))
78151

79-
if self._year <= 2009:
80-
# Ascension of Christ.
81-
self._add_ascension_thursday("Ascension of Christ")
152+
# Ascension Day.
153+
self._add_ascension_thursday(tr("Ascensione del Signore"))
82154

83-
# Corpus Christi.
84-
self._add_corpus_christi_day("Corpus Christi")
155+
# Corpus Domini.
156+
self._add_corpus_christi_day(tr("Corpus Domini"))
85157

86-
# Saints Peter and Paul.
87-
self._add_saints_peter_and_paul_day("Saint Peter and Saint Paul's Day")
158+
# Saints Peter and Paul's Day.
159+
self._add_saints_peter_and_paul_day(tr("Santi Pietro e Paolo"))
160+
161+
# Day Before Assumption of Mary.
162+
self._add_holiday_aug_14(tr("Vigilia dell'Assunzione di Maria Santissima"))
88163

89164
# Assumption of Mary Day.
90-
self._add_assumption_of_mary_day("Assumption Day")
165+
self._add_assumption_of_mary_day(tr("Assunzione di Maria Santissima"))
91166

92-
# Nativity Of Mary Day.
93-
self._add_nativity_of_mary_day("Nativity of Mary Day")
167+
# Day After Assumption of Mary.
168+
self._add_holiday_aug_16(tr("Giorno Successivo all'Assunzione di Maria Santissima"))
94169

95170
# All Saints' Day.
96-
self._add_all_saints_day("All Saints' Day")
171+
self._add_all_saints_day(tr("Tutti i Santi"))
97172

98-
if 1978 <= self._year <= 2004:
99-
# Name day for the civilian name of Pope John Paul II
100-
# (Karol Józef Wojtyła)
101-
# Saint Charles Borromeo Day.
102-
self._add_holiday_nov_4("Saint Charles Borromeo Day")
173+
# All Souls' Day.
174+
self._add_all_souls_day(tr("Tutti i Fedeli Defunti"))
103175

104176
# Immaculate Conception.
105-
self._add_immaculate_conception_day("Immaculate Conception Day")
177+
self._add_immaculate_conception_day(tr("Immacolata Concezione"))
178+
179+
# Christmas Eve.
180+
self._add_christmas_eve(tr("Vigilia di Natale"))
106181

107182
# Christmas Day.
108-
self._add_christmas_day("Christmas Day")
183+
self._add_christmas_day(tr("Natale"))
109184

110185
# Saint Stephen's Day.
111-
self._add_christmas_day_two("Saint Stephen's Day")
186+
self._add_christmas_day_two(tr("Santo Stefano"))
187+
188+
# Saint John the Evangelist's Day.
189+
self._add_christmas_day_three(tr("San Giovanni"))
190+
191+
# Last Day of the Year.
192+
self._add_new_years_eve(tr("Ultimo giorno dell'anno"))
112193

113194

114195
class VA(VaticanCity):

holidays/groups/christian.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,3 +451,13 @@ def _add_whit_sunday(self, name) -> date:
451451
https://en.wikipedia.org/wiki/Pentecost
452452
"""
453453
return self._add_holiday(name, _timedelta(self._easter_sunday, +49))
454+
455+
def _add_trinity_sunday(self, name) -> date:
456+
"""
457+
Add Trinity Sunday (56 days after Easter Sunday).
458+
459+
Trinity Sunday, also called Solemnity of Holy Trinity, is the first Sunday
460+
after Pentecost in the Western Christian liturgical calendar, and the Sunday
461+
of Pentecost in Eastern Christianity.
462+
"""
463+
return self._add_holiday(name, _timedelta(self._easter_sunday, +56))

0 commit comments

Comments
 (0)