From 89ebe469e34767acf500bf9d5dc664ddc1d0608f Mon Sep 17 00:00:00 2001 From: YiGeon Date: Wed, 8 Jan 2025 10:38:23 +0900 Subject: [PATCH 1/5] Add South Korea's temporary public holidays Add South Korea's temporary public holidays to January 27th, 2025. --- holidays/countries/south_korea.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/holidays/countries/south_korea.py b/holidays/countries/south_korea.py index 263049582..0d261f839 100644 --- a/holidays/countries/south_korea.py +++ b/holidays/countries/south_korea.py @@ -108,7 +108,8 @@ def _populate_observed(self, dts: set[date], three_day_holidays: dict[date, str] if not self._is_observed(dt): continue dt_observed = self._get_observed_date( - dt, SUN_TO_NEXT_WORKDAY if dt in three_day_holidays else SAT_SUN_TO_NEXT_WORKDAY + dt, + (SUN_TO_NEXT_WORKDAY if dt in three_day_holidays else SAT_SUN_TO_NEXT_WORKDAY), ) if dt_observed != dt or len(self.get_list(dt)) > 1: if dt_observed == dt: @@ -333,7 +334,7 @@ class SouthKoreaLunisolarHolidays(_CustomChineseHolidays): class SouthKoreaStaticHolidays: """ References: - - https://namu.wiki/w/임시공휴일 * + - https://namu.wiki/w/임ㅜ시공휴일 * - https://namu.wiki/w/공휴일/대한민국 ** - https://namu.wiki/w/대체%20휴일%20제도 @@ -617,6 +618,8 @@ class SouthKoreaStaticHolidays: 2023: (OCT, 2, temporary_public_holiday), # 76th Anniversary of the Armed Forces of Korea. 2024: (OCT, 1, armed_forces_day), + # Added to create a 6-day long holiday period. + 2025: (JAN, 27, temporary_public_holiday), } # Pre-2014 Alternate Holidays # https://namu.wiki/w/대체%20휴일%20제도#s-4.2.1 From 86c8fb084a7f4cbbfbc4ff16d9d3d4871f5e3aab Mon Sep 17 00:00:00 2001 From: YiGeon Date: Wed, 8 Jan 2025 10:52:44 +0900 Subject: [PATCH 2/5] Update 2025 Temporary Public Holiday to KR_COMMON.json --- snapshots/countries/KR_COMMON.json | 1 + 1 file changed, 1 insertion(+) diff --git a/snapshots/countries/KR_COMMON.json b/snapshots/countries/KR_COMMON.json index b59fee696..e95e007ed 100644 --- a/snapshots/countries/KR_COMMON.json +++ b/snapshots/countries/KR_COMMON.json @@ -1293,6 +1293,7 @@ "2024-10-09": "Hangul Day", "2024-12-25": "Christmas Day", "2025-01-01": "New Year's Day", + "2025-01-27": "Temporary Public Holiday", "2025-01-28": "The day preceding Korean New Year", "2025-01-29": "Korean New Year", "2025-01-30": "The second day of Korean New Year", From 4460dd2ae1b99de32d858b037632f59ea80b23c1 Mon Sep 17 00:00:00 2001 From: YiGeon Date: Wed, 8 Jan 2025 10:56:19 +0900 Subject: [PATCH 3/5] Update 2025 Temporary Public Holiday to test_south_korea.py --- tests/countries/test_south_korea.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/countries/test_south_korea.py b/tests/countries/test_south_korea.py index 5c161462b..68ffc1e38 100644 --- a/tests/countries/test_south_korea.py +++ b/tests/countries/test_south_korea.py @@ -78,6 +78,7 @@ def test_special_holidays(self): "2020-08-17", "2023-10-02", "2024-10-01", + "2025-01-27", ) # Pre-2014 Observance sans "1960-12-26" self.assertNoNonObservedHoliday( From 4a35f0112c220c6e64786ad8c5b146c496608192 Mon Sep 17 00:00:00 2001 From: YiGeon Date: Wed, 8 Jan 2025 11:08:26 +0900 Subject: [PATCH 4/5] Correcting incorrectly modified parts --- holidays/countries/south_korea.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/holidays/countries/south_korea.py b/holidays/countries/south_korea.py index 0d261f839..6600f1902 100644 --- a/holidays/countries/south_korea.py +++ b/holidays/countries/south_korea.py @@ -334,7 +334,7 @@ class SouthKoreaLunisolarHolidays(_CustomChineseHolidays): class SouthKoreaStaticHolidays: """ References: - - https://namu.wiki/w/임ㅜ시공휴일 * + - https://namu.wiki/w/임시공휴일 * - https://namu.wiki/w/공휴일/대한민국 ** - https://namu.wiki/w/대체%20휴일%20제도 From 66ed36301ae045011c60e679dba7fed1e5ef53c9 Mon Sep 17 00:00:00 2001 From: YiGeon Date: Wed, 8 Jan 2025 11:20:20 +0900 Subject: [PATCH 5/5] Remove unnecessary brackets --- holidays/countries/south_korea.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/holidays/countries/south_korea.py b/holidays/countries/south_korea.py index 6600f1902..e90912c0a 100644 --- a/holidays/countries/south_korea.py +++ b/holidays/countries/south_korea.py @@ -108,8 +108,7 @@ def _populate_observed(self, dts: set[date], three_day_holidays: dict[date, str] if not self._is_observed(dt): continue dt_observed = self._get_observed_date( - dt, - (SUN_TO_NEXT_WORKDAY if dt in three_day_holidays else SAT_SUN_TO_NEXT_WORKDAY), + dt, SUN_TO_NEXT_WORKDAY if dt in three_day_holidays else SAT_SUN_TO_NEXT_WORKDAY ) if dt_observed != dt or len(self.get_list(dt)) > 1: if dt_observed == dt: