diff --git a/holidays/countries/greece.py b/holidays/countries/greece.py index ee3d08710..235ecb8f3 100644 --- a/holidays/countries/greece.py +++ b/holidays/countries/greece.py @@ -14,7 +14,11 @@ from holidays.calendars.julian_revised import JULIAN_REVISED_CALENDAR from holidays.constants import HALF_DAY, PUBLIC from holidays.groups import ChristianHolidays, InternationalHolidays -from holidays.observed_holiday_base import ObservedHolidayBase, SAT_SUN_TO_NEXT_WORKDAY +from holidays.observed_holiday_base import ( + ObservedHolidayBase, + MON_TO_NEXT_TUE, + SAT_SUN_TO_NEXT_WORKDAY, +) class Greece(ObservedHolidayBase, ChristianHolidays, InternationalHolidays): @@ -36,6 +40,7 @@ def __init__(self, *args, **kwargs): ChristianHolidays.__init__(self, JULIAN_REVISED_CALENDAR) InternationalHolidays.__init__(self) kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_WORKDAY) + kwargs.setdefault("observed_since", 2017) super().__init__(*args, **kwargs) def _populate_public_holidays(self): @@ -45,7 +50,7 @@ def _populate_public_holidays(self): # Epiphany. self._add_epiphany_day(tr("Θεοφάνεια")) - # Clean Monday. + # Green Monday. self._add_ash_monday(tr("Καθαρά Δευτέρα")) # Independence Day. @@ -55,13 +60,16 @@ def _populate_public_holidays(self): self._add_good_friday(tr("Μεγάλη Παρασκευή")) # Easter Monday. - self._add_easter_monday(tr("Δευτέρα του Πάσχα")) + easter_monday = self._add_easter_monday(tr("Δευτέρα του Πάσχα")) - # Monday of the Holy Spirit. + # Whit Monday. self._add_whit_monday(tr("Δευτέρα του Αγίου Πνεύματος")) - # Labour Day. - self._add_observed(self._add_labor_day(self.tr("Εργατική Πρωτομαγιά"))) + self._add_observed( + # Labor Day. + may_1 := self._add_labor_day(self.tr("Εργατική Πρωτομαγιά")), + rule=MON_TO_NEXT_TUE if may_1 == easter_monday else SAT_SUN_TO_NEXT_WORKDAY, + ) # Dormition of the Mother of God. self._add_assumption_of_mary_day(tr("Κοίμηση της Θεοτόκου")) diff --git a/holidays/locale/el/LC_MESSAGES/GR.po b/holidays/locale/el/LC_MESSAGES/GR.po index e53c504db..53577458a 100644 --- a/holidays/locale/el/LC_MESSAGES/GR.po +++ b/holidays/locale/el/LC_MESSAGES/GR.po @@ -24,7 +24,7 @@ msgstr "" msgid "Θεοφάνεια" msgstr "" -#. Clean Monday. +#. Green Monday. msgid "Καθαρά Δευτέρα" msgstr "" @@ -40,11 +40,11 @@ msgstr "" msgid "Δευτέρα του Πάσχα" msgstr "" -#. Monday of the Holy Spirit. +#. Whit Monday. msgid "Δευτέρα του Αγίου Πνεύματος" msgstr "" -#. Labour Day. +#. Labor Day. msgid "Εργατική Πρωτομαγιά" msgstr "" diff --git a/holidays/locale/en_US/LC_MESSAGES/GR.po b/holidays/locale/en_US/LC_MESSAGES/GR.po index 6ac99caa9..6224ea9ba 100644 --- a/holidays/locale/en_US/LC_MESSAGES/GR.po +++ b/holidays/locale/en_US/LC_MESSAGES/GR.po @@ -24,9 +24,9 @@ msgstr "New Year's Day" msgid "Θεοφάνεια" msgstr "Epiphany" -#. Clean Monday. +#. Green Monday. msgid "Καθαρά Δευτέρα" -msgstr "Clean Monday" +msgstr "Green Monday" #. Independence Day. msgid "Εικοστή Πέμπτη Μαρτίου" @@ -40,11 +40,11 @@ msgstr "Good Friday" msgid "Δευτέρα του Πάσχα" msgstr "Easter Monday" -#. Monday of the Holy Spirit. +#. Whit Monday. msgid "Δευτέρα του Αγίου Πνεύματος" -msgstr "Easter Monday" +msgstr "Whit Monday" -#. Labour Day. +#. Labor Day. msgid "Εργατική Πρωτομαγιά" msgstr "Labor Day" diff --git a/holidays/locale/uk/LC_MESSAGES/GR.po b/holidays/locale/uk/LC_MESSAGES/GR.po index 0599de088..a0bea19c1 100644 --- a/holidays/locale/uk/LC_MESSAGES/GR.po +++ b/holidays/locale/uk/LC_MESSAGES/GR.po @@ -24,7 +24,7 @@ msgstr "Новий рік" msgid "Θεοφάνεια" msgstr "Богоявлення" -#. Clean Monday. +#. Green Monday. msgid "Καθαρά Δευτέρα" msgstr "Чистий понеділок" @@ -40,11 +40,11 @@ msgstr "Страсна пʼятниця" msgid "Δευτέρα του Πάσχα" msgstr "Великодній понеділок" -#. Monday of the Holy Spirit. +#. Whit Monday. msgid "Δευτέρα του Αγίου Πνεύματος" msgstr "День Святого Духа" -#. Labour Day. +#. Labor Day. msgid "Εργατική Πρωτομαγιά" msgstr "День праці" diff --git a/snapshots/countries/GR_COMMON.json b/snapshots/countries/GR_COMMON.json index 886c44b08..bdc68a976 100644 --- a/snapshots/countries/GR_COMMON.json +++ b/snapshots/countries/GR_COMMON.json @@ -62,7 +62,6 @@ "1954-04-23": "Good Friday", "1954-04-26": "Easter Monday", "1954-05-01": "Labor Day", - "1954-05-03": "Labor Day (observed)", "1954-06-14": "Easter Monday", "1954-08-15": "Dormition of the Mother of God", "1954-10-28": "Ochi Day", @@ -77,7 +76,6 @@ "1955-04-15": "Good Friday", "1955-04-18": "Easter Monday", "1955-05-01": "Labor Day", - "1955-05-02": "Labor Day (observed)", "1955-06-06": "Easter Monday", "1955-08-15": "Dormition of the Mother of God", "1955-10-28": "Ochi Day", @@ -147,7 +145,6 @@ "1960-04-15": "Good Friday", "1960-04-18": "Easter Monday", "1960-05-01": "Labor Day", - "1960-05-02": "Labor Day (observed)", "1960-06-06": "Easter Monday", "1960-08-15": "Dormition of the Mother of God", "1960-10-28": "Ochi Day", @@ -217,7 +214,6 @@ "1965-04-23": "Good Friday", "1965-04-26": "Easter Monday", "1965-05-01": "Labor Day", - "1965-05-03": "Labor Day (observed)", "1965-06-14": "Easter Monday", "1965-08-15": "Dormition of the Mother of God", "1965-10-28": "Ochi Day", @@ -232,7 +228,6 @@ "1966-04-08": "Good Friday", "1966-04-11": "Easter Monday", "1966-05-01": "Labor Day", - "1966-05-02": "Labor Day (observed)", "1966-05-30": "Easter Monday", "1966-08-15": "Dormition of the Mother of God", "1966-10-28": "Ochi Day", @@ -302,7 +297,6 @@ "1971-04-16": "Good Friday", "1971-04-19": "Easter Monday", "1971-05-01": "Labor Day", - "1971-05-03": "Labor Day (observed)", "1971-06-07": "Easter Monday", "1971-08-15": "Dormition of the Mother of God", "1971-10-28": "Ochi Day", @@ -373,7 +367,6 @@ "1976-04-23": "Good Friday", "1976-04-26": "Easter Monday", "1976-05-01": "Labor Day", - "1976-05-03": "Labor Day (observed)", "1976-06-14": "Easter Monday", "1976-08-15": "Dormition of the Mother of God", "1976-10-28": "Ochi Day", @@ -388,7 +381,6 @@ "1977-04-08": "Good Friday", "1977-04-11": "Easter Monday", "1977-05-01": "Labor Day", - "1977-05-02": "Labor Day (observed)", "1977-05-30": "Easter Monday", "1977-08-15": "Dormition of the Mother of God", "1977-10-28": "Ochi Day", @@ -458,7 +450,6 @@ "1982-04-16": "Good Friday", "1982-04-19": "Easter Monday", "1982-05-01": "Labor Day", - "1982-05-03": "Labor Day (observed)", "1982-06-07": "Easter Monday", "1982-08-15": "Dormition of the Mother of God", "1982-10-28": "Ochi Day", @@ -471,7 +462,6 @@ "1983-03-21": "Clean Monday", "1983-03-25": "Independence Day", "1983-05-01": "Labor Day", - "1983-05-02": "Labor Day (observed)", "1983-05-06": "Good Friday", "1983-05-09": "Easter Monday", "1983-06-27": "Easter Monday", @@ -544,7 +534,6 @@ "1988-04-08": "Good Friday", "1988-04-11": "Easter Monday", "1988-05-01": "Labor Day", - "1988-05-02": "Labor Day (observed)", "1988-05-30": "Easter Monday", "1988-08-15": "Dormition of the Mother of God", "1988-10-28": "Ochi Day", @@ -614,7 +603,6 @@ "1993-04-16": "Good Friday", "1993-04-19": "Easter Monday", "1993-05-01": "Labor Day", - "1993-05-03": "Labor Day (observed)", "1993-06-07": "Easter Monday", "1993-08-15": "Dormition of the Mother of God", "1993-10-28": "Ochi Day", @@ -629,7 +617,6 @@ "1994-04-29": "Good Friday", "1994-05-01": "Labor Day", "1994-05-02": "Easter Monday", - "1994-05-03": "Labor Day (observed)", "1994-06-20": "Easter Monday", "1994-08-15": "Dormition of the Mother of God", "1994-10-28": "Ochi Day", @@ -700,7 +687,6 @@ "1999-04-09": "Good Friday", "1999-04-12": "Easter Monday", "1999-05-01": "Labor Day", - "1999-05-03": "Labor Day (observed)", "1999-05-31": "Easter Monday", "1999-08-15": "Dormition of the Mother of God", "1999-10-28": "Ochi Day", @@ -770,7 +756,6 @@ "2004-04-09": "Good Friday", "2004-04-12": "Easter Monday", "2004-05-01": "Labor Day", - "2004-05-03": "Labor Day (observed)", "2004-05-31": "Easter Monday", "2004-08-15": "Dormition of the Mother of God", "2004-10-28": "Ochi Day", @@ -785,7 +770,6 @@ "2005-04-29": "Good Friday", "2005-05-01": "Labor Day", "2005-05-02": "Easter Monday", - "2005-05-03": "Labor Day (observed)", "2005-06-20": "Easter Monday", "2005-08-15": "Dormition of the Mother of God", "2005-10-28": "Ochi Day", @@ -856,7 +840,6 @@ "2010-04-02": "Good Friday", "2010-04-05": "Easter Monday", "2010-05-01": "Labor Day", - "2010-05-03": "Labor Day (observed)", "2010-05-24": "Easter Monday", "2010-08-15": "Dormition of the Mother of God", "2010-10-28": "Ochi Day", @@ -871,7 +854,6 @@ "2011-04-22": "Good Friday", "2011-04-25": "Easter Monday", "2011-05-01": "Labor Day", - "2011-05-02": "Labor Day (observed)", "2011-06-13": "Easter Monday", "2011-08-15": "Dormition of the Mother of God", "2011-10-28": "Ochi Day", @@ -942,7 +924,6 @@ "2016-04-29": "Good Friday", "2016-05-01": "Labor Day", "2016-05-02": "Easter Monday", - "2016-05-03": "Labor Day (observed)", "2016-06-20": "Easter Monday", "2016-08-15": "Dormition of the Mother of God", "2016-10-28": "Ochi Day", diff --git a/tests/countries/test_greece.py b/tests/countries/test_greece.py index 0d1ab5f7f..a60b29c26 100644 --- a/tests/countries/test_greece.py +++ b/tests/countries/test_greece.py @@ -74,7 +74,7 @@ def test_easter_monday(self): "2024-05-06", ) - def test_monday_of_the_holy_spirit(self): + def test_whit_monday(self): self.assertHolidayName( "Δευτέρα του Αγίου Πνεύματος", "2018-05-28", @@ -86,19 +86,17 @@ def test_monday_of_the_holy_spirit(self): "2024-06-24", ) - def test_labour_day_observed(self): + def test_labor_day_observed(self): name_observed = "Εργατική Πρωτομαγιά (παρατηρήθηκε)" dt = ( - "2011-05-02", - "2016-05-03", "2021-05-04", "2022-05-02", ) self.assertHolidayName(name_observed, dt) self.assertNoNonObservedHoliday(dt) - self.assertNoHolidayName(name_observed, 2017, 2018, 2019, 2020, 2023) + self.assertNoHolidayName(name_observed, range(2000, 2021), 2023) - def test_hal_day_2022(self): + def test_half_day_2022(self): self.assertHolidays( Greece(categories=HALF_DAY, years=2022), ("2022-12-24", "Παραμονή Χριστουγέννων"), @@ -133,13 +131,13 @@ def test_l10n_en_us(self): "en_US", ("2022-01-01", "New Year's Day"), ("2022-01-06", "Epiphany"), - ("2022-03-07", "Clean Monday"), + ("2022-03-07", "Green Monday"), ("2022-03-25", "Independence Day"), ("2022-04-22", "Good Friday"), ("2022-04-25", "Easter Monday"), ("2022-05-01", "Labor Day"), ("2022-05-02", "Labor Day (observed)"), - ("2022-06-13", "Easter Monday"), + ("2022-06-13", "Whit Monday"), ("2022-08-15", "Dormition of the Mother of God"), ("2022-10-28", "Ochi Day"), ("2022-12-24", "Christmas Eve"),