Skip to content
Merged
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 CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ Tudor Văran
Victor Luna
Victor Miti
Ville Skyttä
Vilmos Prokaj
Vu Nhat Chuong
Wasif Shahzad
Youhei Sakurai
82 changes: 82 additions & 0 deletions holidays/countries/hungary.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,21 @@ class HungaryStaticHolidays:
"""Hungary special holidays.

References:
* [1991](https://archive.org/details/7-1990-xii-27-mum-rendelet)
* [1992](https://web.archive.org/web/20250526085935/https://jogkodex.hu/jsz/1992_3_mum_rendelet_5937748)
* [1993](https://web.archive.org/web/20250526090343/https://jogkodex.hu/jsz/1992_7_mum_rendelet_7815697)
* [1994](https://web.archive.org/web/20250526090541/https://jogkodex.hu/jsz/1993_3_mum_rendelet_3120363)
* [1997](https://web.archive.org/web/20250526090817/https://jogkodex.hu/jsz/1996_11_mum_rendelet_3554324)
* [1998](https://web.archive.org/web/20250526091318/https://jogkodex.hu/jsz/1997_18_mum_rendelet_7493439)
* [1999](https://web.archive.org/web/20250526093916/https://jogkodex.hu/jsz/1998_3_szcsm_rendelet_7336830)
* [2001](https://archive.org/details/43-2000-xii-18-gm-rendelet)
* [2002](https://web.archive.org/web/20250526071659/https://jogkodex.hu/jsz/2001_25_gm_rendelet_9200619)
* [2003](https://web.archive.org/web/20250526071517/https://jogkodex.hu/jsz/2002_2_fmm_rendelet_1831209)
* [2004](https://web.archive.org/web/20250526071310/https://jogkodex.hu/jsz/2003_9_fmm_rendelet_8666269)
* [2005](https://web.archive.org/web/20250526071135/https://jogkodex.hu/jsz/2004_25_fmm_rendelet_4309634)
* [2007](https://web.archive.org/web/20250526064108/https://jogkodex.hu/jsz/2006_4_szmm_rendelet_8628960)
* [2008](https://web.archive.org/web/20250526051643/https://jogkodex.hu/jsz/2007_27_szmm_rendelet_3904252)
* [2009](https://web.archive.org/web/20250526051816/https://jogkodex.hu/jsz/2008_16_szmm_rendelet_7668376)
* [2010](https://web.archive.org/web/20250428204804/https://njt.hu/jogszabaly/2009-20-20-1X)
* [2011](https://web.archive.org/web/20250428204915/https://njt.hu/jogszabaly/2010-7-20-2X)
* [2012](https://web.archive.org/web/20250428204812/https://njt.hu/jogszabaly/2011-39-20-2X)
Expand All @@ -131,13 +146,75 @@ class HungaryStaticHolidays:
* [2022](https://web.archive.org/web/20241107133627/https://njt.hu/jogszabaly/2021-23-20-7Q)
* [2024](https://web.archive.org/web/20241105131832/https://njt.hu/jogszabaly/2023-15-20-8P)
* [2025](https://web.archive.org/web/20241219165144/https://njt.hu/jogszabaly/2024-11-20-2X)
* [2026](https://web.archive.org/web/20250526083742/https://jogkodex.hu/jsz/2025_10_ngm_rendelet_5591314)
"""

# Substituted date format.
substituted_date_format = tr("%Y. %m. %d.")
# Day off (substituted from %s).
substituted_label = tr("Pihenőnap (%s-től helyettesítve)")
special_public_holidays = {
1991: (AUG, 19, AUG, 17),
1992: (
(AUG, 21, AUG, 29),
(DEC, 24, DEC, 19),
),
1993: (DEC, 24, DEC, 18),
1994: (MAR, 14, MAR, 12),
1997: (
(MAY, 2, APR, 26),
(OCT, 24, OCT, 18),
(DEC, 24, DEC, 20),
),
1998: (
(JAN, 2, JAN, 10),
(AUG, 21, AUG, 15),
(DEC, 24, DEC, 19),
),
1999: (DEC, 24, DEC, 18),
2001: (
(MAR, 16, MAR, 10),
(APR, 30, APR, 28),
(OCT, 22, OCT, 20),
(NOV, 2, OCT, 27),
(DEC, 24, DEC, 22),
(DEC, 31, DEC, 29),
),
2002: (
(AUG, 19, AUG, 10),
(DEC, 24, DEC, 28),
),
2003: (
(MAY, 2, APR, 26),
(OCT, 24, OCT, 18),
(DEC, 24, DEC, 13),
),
2004: (
(JAN, 2, JAN, 10),
(DEC, 24, DEC, 18),
),
2005: (
(MAR, 14, MAR, 19),
(OCT, 31, NOV, 5),
),
2007: (
(MAR, 16, MAR, 10),
(APR, 30, APR, 21),
(OCT, 22, OCT, 20),
(NOV, 2, OCT, 27),
(DEC, 24, DEC, 22),
(DEC, 31, DEC, 29),
),
2008: (
(MAY, 2, APR, 26),
(OCT, 24, OCT, 18),
(DEC, 24, DEC, 20),
),
2009: (
(JAN, 2, MAR, 28),
(AUG, 21, AUG, 29),
(DEC, 24, DEC, 19),
),
2010: (DEC, 24, DEC, 11),
2011: (
(MAR, 14, MAR, 19),
Expand Down Expand Up @@ -202,4 +279,9 @@ class HungaryStaticHolidays:
(OCT, 24, OCT, 18),
(DEC, 24, DEC, 13),
),
2026: (
(JAN, 2, JAN, 10),
(AUG, 21, AUG, 8),
(DEC, 24, DEC, 12),
),
}
42 changes: 42 additions & 0 deletions tests/countries/test_hungary.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,45 @@ def test_october_socialist_revolution_day(self):

def test_substituted(self):
dt = (
"1991-08-19",
"1992-08-21",
"1992-12-24",
"1993-12-24",
"1994-03-14",
"1997-05-02",
"1997-10-24",
"1997-12-24",
"1998-01-02",
"1998-08-21",
"1998-12-24",
"1999-12-24",
"2001-03-16",
"2001-04-30",
"2001-10-22",
"2001-11-02",
"2001-12-24",
"2001-12-31",
"2002-08-19",
"2002-12-24",
"2003-05-02",
"2003-10-24",
"2003-12-24",
"2004-01-02",
"2004-12-24",
"2005-03-14",
"2005-10-31",
"2007-03-16",
"2007-04-30",
"2007-10-22",
"2007-11-02",
"2007-12-24",
"2007-12-31",
"2008-05-02",
"2008-10-24",
"2008-12-24",
"2009-01-02",
"2009-08-21",
"2009-12-24",
"2010-12-24",
"2011-03-14",
"2011-10-31",
Expand Down Expand Up @@ -224,6 +263,9 @@ def test_substituted(self):
"2025-05-02",
"2025-10-24",
"2025-12-24",
"2026-01-02",
"2026-08-21",
"2026-12-24",
)
self.assertHoliday(dt)

Expand Down