Skip to content

Commit

Permalink
Merge substituted holidays with special holidays (#1580)
Browse files Browse the repository at this point in the history
  • Loading branch information
KJhellico authored Dec 1, 2023
1 parent de9997f commit fe580ea
Show file tree
Hide file tree
Showing 8 changed files with 260 additions and 272 deletions.
168 changes: 84 additions & 84 deletions holidays/countries/belarus.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,138 +90,138 @@ class BelarusStaticHolidays:
substituted_date_format = tr("%d.%m.%Y")
# Day off (substituted from %s).
substituted_label = tr("Выходны (перанесены з %s)")
substituted_holidays = {
special_holidays = {
1998: (
(JAN, 10, JAN, 2),
(APR, 25, APR, 27),
(JAN, 2, JAN, 10),
(APR, 27, APR, 25),
),
1999: (
(JAN, 16, JAN, 8),
(APR, 17, APR, 19),
(JAN, 8, JAN, 16),
(APR, 19, APR, 17),
),
2000: (
(MAY, 13, MAY, 8),
(NOV, 11, NOV, 6),
(MAY, 8, MAY, 13),
(NOV, 6, NOV, 11),
),
2001: (
(JAN, 20, JAN, 2),
(MAR, 3, MAR, 9),
(APR, 21, APR, 23),
(APR, 28, APR, 30),
(JUL, 7, JUL, 2),
(DEC, 22, DEC, 24),
(DEC, 29, DEC, 31),
(JAN, 2, JAN, 20),
(MAR, 9, MAR, 3),
(APR, 23, APR, 21),
(APR, 30, APR, 28),
(JUL, 2, JUL, 7),
(DEC, 24, DEC, 22),
(DEC, 31, DEC, 29),
),
2002: (
(JAN, 5, JAN, 2),
(MAY, 18, MAY, 10),
(NOV, 16, NOV, 8),
(JAN, 2, JAN, 5),
(MAY, 10, MAY, 18),
(NOV, 8, NOV, 16),
),
2003: (
(JAN, 4, JAN, 6),
(MAY, 3, MAY, 5),
(JAN, 6, JAN, 4),
(MAY, 5, MAY, 3),
),
2004: (
(JAN, 10, JAN, 2),
(JAN, 17, JAN, 5),
(JAN, 31, JAN, 6),
(APR, 17, APR, 19),
(JAN, 2, JAN, 10),
(JAN, 5, JAN, 17),
(JAN, 6, JAN, 31),
(APR, 19, APR, 17),
),
2005: (MAR, 12, MAR, 7),
2005: (MAR, 7, MAR, 12),
2006: (
(JAN, 21, JAN, 2),
(MAY, 6, MAY, 8),
(NOV, 4, NOV, 6),
(JAN, 2, JAN, 21),
(MAY, 8, MAY, 6),
(NOV, 6, NOV, 4),
),
2007: (
(2006, DEC, 30, JAN, 2),
(MAR, 17, MAR, 9),
(APR, 14, APR, 16),
(MAY, 5, APR, 30),
(JUL, 7, JUL, 2),
(DEC, 22, DEC, 24),
(DEC, 29, DEC, 31),
(JAN, 2, DEC, 30, 2006),
(MAR, 9, MAR, 17),
(APR, 16, APR, 14),
(APR, 30, MAY, 5),
(JUL, 2, JUL, 7),
(DEC, 24, DEC, 22),
(DEC, 31, DEC, 29),
),
2008: (
(JAN, 12, JAN, 2),
(MAY, 3, MAY, 5),
(JUN, 28, JUL, 4),
(DEC, 20, DEC, 26),
(JAN, 2, JAN, 12),
(MAY, 5, MAY, 3),
(JUL, 4, JUN, 28),
(DEC, 26, DEC, 20),
),
2009: (
(JAN, 10, JAN, 2),
(APR, 25, APR, 27),
(JAN, 2, JAN, 10),
(APR, 27, APR, 25),
),
2010: (
(JAN, 23, JAN, 8),
(APR, 17, APR, 12),
(MAY, 15, MAY, 10),
(JAN, 8, JAN, 23),
(APR, 12, APR, 17),
(MAY, 10, MAY, 15),
),
2011: (
(MAR, 12, MAR, 7),
(MAY, 14, MAY, 2),
(MAR, 7, MAR, 12),
(MAY, 2, MAY, 14),
),
2012: (
(MAR, 11, MAR, 9),
(APR, 28, APR, 23),
(JUN, 30, JUL, 2),
(DEC, 22, DEC, 24),
(DEC, 29, DEC, 31),
(MAR, 9, MAR, 11),
(APR, 23, APR, 28),
(JUL, 2, JUN, 30),
(DEC, 24, DEC, 22),
(DEC, 31, DEC, 29),
),
2013: (
(JAN, 5, JAN, 2),
(MAY, 18, MAY, 10),
(JAN, 2, JAN, 5),
(MAY, 10, MAY, 18),
),
2014: (
(JAN, 4, JAN, 2),
(JAN, 11, JAN, 6),
(MAY, 3, APR, 30),
(JUL, 12, JUL, 4),
(DEC, 20, DEC, 26),
(JAN, 2, JAN, 4),
(JAN, 6, JAN, 11),
(APR, 30, MAY, 3),
(JUL, 4, JUL, 12),
(DEC, 26, DEC, 20),
),
2015: (
(JAN, 10, JAN, 2),
(APR, 25, APR, 20),
(JAN, 2, JAN, 10),
(APR, 20, APR, 25),
),
2016: (
(JAN, 16, JAN, 8),
(MAR, 5, MAR, 7),
(JAN, 8, JAN, 16),
(MAR, 7, MAR, 5),
),
2017: (
(JAN, 21, JAN, 2),
(APR, 29, APR, 24),
(MAY, 6, MAY, 8),
(NOV, 4, NOV, 6),
(JAN, 2, JAN, 21),
(APR, 24, APR, 29),
(MAY, 8, MAY, 6),
(NOV, 6, NOV, 4),
),
2018: (
(JAN, 20, JAN, 2),
(MAR, 3, MAR, 9),
(APR, 14, APR, 16),
(APR, 28, APR, 30),
(JUL, 7, JUL, 2),
(DEC, 22, DEC, 24),
(DEC, 29, DEC, 31),
(JAN, 2, JAN, 20),
(MAR, 9, MAR, 3),
(APR, 16, APR, 14),
(APR, 30, APR, 28),
(JUL, 2, JUL, 7),
(DEC, 24, DEC, 22),
(DEC, 31, DEC, 29),
),
2019: (
(MAY, 4, MAY, 6),
(MAY, 11, MAY, 8),
(NOV, 16, NOV, 8),
(MAY, 6, MAY, 4),
(MAY, 8, MAY, 11),
(NOV, 8, NOV, 16),
),
2020: (
(JAN, 4, JAN, 6),
(APR, 4, APR, 27),
(JAN, 6, JAN, 4),
(APR, 27, APR, 4),
),
2021: (
(JAN, 16, JAN, 8),
(MAY, 15, MAY, 10),
(JAN, 8, JAN, 16),
(MAY, 10, MAY, 15),
),
2022: (
(MAR, 12, MAR, 7),
(MAY, 14, MAY, 2),
(MAR, 7, MAR, 12),
(MAY, 2, MAY, 14),
),
2023: (
(APR, 29, APR, 24),
(MAY, 13, MAY, 8),
(NOV, 11, NOV, 6),
(APR, 24, APR, 29),
(MAY, 8, MAY, 13),
(NOV, 6, NOV, 11),
),
}
76 changes: 38 additions & 38 deletions holidays/countries/hungary.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,64 +135,64 @@ class HungaryStaticHolidays:
substituted_date_format = tr("%Y. %m. %d.")
# Day off (substituted from %s).
substituted_label = tr("Pihenőnap (%s-től helyettesítve)")
substituted_holidays = {
2010: (DEC, 11, DEC, 24),
special_holidays = {
2010: (DEC, 24, DEC, 11),
2011: (
(MAR, 19, MAR, 14),
(NOV, 5, OCT, 31),
(MAR, 14, MAR, 19),
(OCT, 31, NOV, 5),
),
2012: (
(MAR, 24, MAR, 16),
(APR, 21, APR, 30),
(OCT, 27, OCT, 22),
(NOV, 10, NOV, 2),
(DEC, 15, DEC, 24),
(DEC, 1, DEC, 31),
(MAR, 16, MAR, 24),
(APR, 30, APR, 21),
(OCT, 22, OCT, 27),
(NOV, 2, NOV, 10),
(DEC, 24, DEC, 15),
(DEC, 31, DEC, 1),
),
2013: (
(AUG, 24, AUG, 19),
(DEC, 7, DEC, 24),
(DEC, 21, DEC, 27),
(AUG, 19, AUG, 24),
(DEC, 24, DEC, 7),
(DEC, 27, DEC, 21),
),
2014: (
(MAY, 10, MAY, 2),
(OCT, 18, OCT, 24),
(DEC, 13, DEC, 24),
(MAY, 2, MAY, 10),
(OCT, 24, OCT, 18),
(DEC, 24, DEC, 13),
),
2015: (
(JAN, 10, JAN, 2),
(AUG, 8, AUG, 21),
(DEC, 12, DEC, 24),
(JAN, 2, JAN, 10),
(AUG, 21, AUG, 8),
(DEC, 24, DEC, 12),
),
2016: (
(MAR, 5, MAR, 14),
(OCT, 15, OCT, 31),
(MAR, 14, MAR, 5),
(OCT, 31, OCT, 15),
),
2018: (
(MAR, 10, MAR, 16),
(APR, 21, APR, 30),
(OCT, 13, OCT, 22),
(NOV, 10, NOV, 2),
(DEC, 1, DEC, 24),
(DEC, 15, DEC, 31),
(MAR, 16, MAR, 10),
(APR, 30, APR, 21),
(OCT, 22, OCT, 13),
(NOV, 2, NOV, 10),
(DEC, 24, DEC, 1),
(DEC, 31, DEC, 15),
),
2019: (
(AUG, 10, AUG, 19),
(DEC, 7, DEC, 24),
(DEC, 14, DEC, 27),
(AUG, 19, AUG, 10),
(DEC, 24, DEC, 7),
(DEC, 27, DEC, 14),
),
2020: (
(AUG, 29, AUG, 21),
(DEC, 12, DEC, 24),
(AUG, 21, AUG, 29),
(DEC, 24, DEC, 12),
),
2021: (DEC, 11, DEC, 24),
2021: (DEC, 24, DEC, 11),
2022: (
(MAR, 26, MAR, 14),
(OCT, 15, OCT, 31),
(MAR, 14, MAR, 26),
(OCT, 31, OCT, 15),
),
2024: (
(AUG, 3, AUG, 19),
(DEC, 7, DEC, 24),
(DEC, 14, DEC, 27),
(AUG, 19, AUG, 3),
(DEC, 24, DEC, 7),
(DEC, 27, DEC, 14),
),
}
2 changes: 1 addition & 1 deletion holidays/countries/south_korea.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ class SouthKoreaStaticHolidays:
}
# Pre-2014 Alternate Holidays
# https://namu.wiki/w/대체%20휴일%20제도#s-4.2.1
special_holidays_observed = {
special_public_holidays_observed = {
1959: (APR, 6, tr("식목일")),
1960: (
(JUL, 18, tr("제헌절")),
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/tonga.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class TongaStaticHolidays:
),
}
# Special Case for 2021
special_holidays_observed = {
special_public_holidays_observed = {
# Boxing Day.
2021: (DEC, 27, tr("'Aho 2 'o e Kilisimasi")),
}
Loading

0 comments on commit fe580ea

Please sign in to comment.