diff --git a/AUTHORS b/AUTHORS index 1a0419004..106eb1edd 100644 --- a/AUTHORS +++ b/AUTHORS @@ -9,6 +9,7 @@ Alejandro Antunes Alexander Schulze Alexandre Carvalho Anders Wenhaug +Andrei Klimenko Andres Marrugo Anthony Rose Anton Daitche diff --git a/holidays/countries/russia.py b/holidays/countries/russia.py index 534179f6a..4257fb38d 100644 --- a/holidays/countries/russia.py +++ b/holidays/countries/russia.py @@ -12,7 +12,7 @@ from gettext import gettext as tr -from holidays.calendars.gregorian import JAN, FEB, MAY +from holidays.calendars.gregorian import JAN, FEB, APR, MAY, JUN, DEC from holidays.calendars.julian import JULIAN_CALENDAR from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays from holidays.holiday_base import HolidayBase @@ -113,11 +113,25 @@ class RUS(Russia): class RussiaStaticHolidays: + # Date format (see strftime() Format Codes). + substituted_date_format = tr("%d.%m.%Y") + # Day off (substituted from %s). + substituted_label = tr("Выходной (перенесено с %s)") + special_public_holidays = { - # Bridge days for 01/01/2023 and 08/01/2023. + # Substituted Holidays 2023 # src: https://www.consultant.ru/document/cons_doc_LAW_425407/ 2023: ( - (FEB, 24, tr("День защитника Отечества")), - (MAY, 8, tr("День Победы")), + (FEB, 24, JAN, 1), + (MAY, 8, JAN, 8), + ), + # Substituted Holidays 2024 + # src: https://www.consultant.ru/document/cons_doc_LAW_455140/ + 2024: ( + (APR, 29, APR, 27), + (APR, 30, FEB, 11), + (MAY, 10, JUN, 1), + (DEC, 30, DEC, 28), + (DEC, 31, JAN, 7), ), } diff --git a/holidays/locale/en_US/LC_MESSAGES/RU.po b/holidays/locale/en_US/LC_MESSAGES/RU.po index abece3fa9..a00490071 100644 --- a/holidays/locale/en_US/LC_MESSAGES/RU.po +++ b/holidays/locale/en_US/LC_MESSAGES/RU.po @@ -16,7 +16,7 @@ msgid "" msgstr "" "Project-Id-Version: Python Holidays 0.29\n" "POT-Creation-Date: 2023-02-15 08:13-0800\n" -"PO-Revision-Date: 2023-07-13 15:58+0300\n" +"PO-Revision-Date: 2024-05-21 13:26+0700\n" "Last-Translator: ~Jhellico \n" "Language-Team: Python Holidays localization team\n" "Language: en_US\n" @@ -25,7 +25,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "Generated-By: Lingua 4.15.0\n" -"X-Generator: Poedit 3.2.2\n" +"X-Generator: Poedit 3.4.4\n" #. New Year's Day. msgid "Новый год" @@ -82,3 +82,12 @@ msgstr "Day of consent and reconciliation" #. Anniversary of the Great October Socialist Revolution. msgid "Годовщина Великой Октябрьской социалистической революции" msgstr "Anniversary of the Great October Socialist Revolution" + +#. Date format (see strftime() Format Codes). +msgid "%d.%m.%Y" +msgstr "%m/%d/%Y" + +#. Day off (substituted from %s). +#, c-format +msgid "Выходной (перенесено с %s)" +msgstr "Day off (substituted from %s)" diff --git a/holidays/locale/ru/LC_MESSAGES/RU.po b/holidays/locale/ru/LC_MESSAGES/RU.po index 3933501bd..4a25052a3 100644 --- a/holidays/locale/ru/LC_MESSAGES/RU.po +++ b/holidays/locale/ru/LC_MESSAGES/RU.po @@ -16,7 +16,7 @@ msgid "" msgstr "" "Project-Id-Version: Python Holidays 0.29\n" "POT-Creation-Date: 2023-02-15 08:13-0800\n" -"PO-Revision-Date: 2023-07-13 15:57+0300\n" +"PO-Revision-Date: 2024-05-21 13:26+0700\n" "Last-Translator: ~Jhellico \n" "Language-Team: Python Holidays localization team\n" "Language: ru\n" @@ -25,7 +25,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" "Generated-By: Lingua 4.15.0\n" -"X-Generator: Poedit 3.2.2\n" +"X-Generator: Poedit 3.4.4\n" #. New Year's Day. msgid "Новый год" @@ -80,3 +80,12 @@ msgstr "" #. Anniversary of the Great October Socialist Revolution. msgid "Годовщина Великой Октябрьской социалистической революции" msgstr "" + +#. Date format (see strftime() Format Codes). +msgid "%d.%m.%Y" +msgstr "" + +#. Day off (substituted from %s). +#, c-format +msgid "Выходной (перенесено с %s)" +msgstr "" diff --git a/snapshots/countries/RU_COMMON.json b/snapshots/countries/RU_COMMON.json index e59e52ea3..6a5f9fe6c 100644 --- a/snapshots/countries/RU_COMMON.json +++ b/snapshots/countries/RU_COMMON.json @@ -371,10 +371,10 @@ "2023-01-07": "Christmas Day", "2023-01-08": "New Year Holidays", "2023-02-23": "Fatherland Defender's Day", - "2023-02-24": "Fatherland Defender's Day", + "2023-02-24": "Day off (substituted from 01/01/2023)", "2023-03-08": "International Women's Day", "2023-05-01": "Holiday of Spring and Labor", - "2023-05-08": "Victory Day", + "2023-05-08": "Day off (substituted from 01/08/2023)", "2023-05-09": "Victory Day", "2023-06-12": "Russia Day", "2023-11-04": "Unity Day", @@ -388,10 +388,15 @@ "2024-01-08": "New Year Holidays", "2024-02-23": "Fatherland Defender's Day", "2024-03-08": "International Women's Day", + "2024-04-29": "Day off (substituted from 04/27/2024)", + "2024-04-30": "Day off (substituted from 02/11/2024)", "2024-05-01": "Holiday of Spring and Labor", "2024-05-09": "Victory Day", + "2024-05-10": "Day off (substituted from 06/01/2024)", "2024-06-12": "Russia Day", "2024-11-04": "Unity Day", + "2024-12-30": "Day off (substituted from 12/28/2024)", + "2024-12-31": "Day off (substituted from 01/07/2024)", "2025-01-01": "New Year Holidays", "2025-01-02": "New Year Holidays", "2025-01-03": "New Year Holidays", diff --git a/tests/countries/test_russia.py b/tests/countries/test_russia.py index 3f2b7b3d1..31666ff5d 100644 --- a/tests/countries/test_russia.py +++ b/tests/countries/test_russia.py @@ -29,8 +29,14 @@ def test_no_holidays(self): def test_special_holidays(self): self.assertHoliday( + # Substituted Holidays. "2023-02-24", "2023-05-08", + "2024-04-29", + "2024-04-30", + "2024-05-10", + "2024-12-30", + "2024-12-31", ) def test_new_year(self):