From 45ab4d540746cd2582cb89c2e20e7b3cbead3f83 Mon Sep 17 00:00:00 2001 From: NateScarlet Date: Mon, 7 Sep 2020 22:33:33 +0800 Subject: [PATCH] fix: missing 2020-01-31 fix #73 --- fetch_holidays.py | 1 + tests/description_parsing_cases.json | 1 + 2 files changed, 2 insertions(+) diff --git a/fetch_holidays.py b/fetch_holidays.py index fc71b4d..289a42c 100755 --- a/fetch_holidays.py +++ b/fetch_holidays.py @@ -189,6 +189,7 @@ class SentenceParser: special_cases = { '延长2020年春节假期至2月2日(农历正月初九': [ + {"date": date(2020, 1, 31), "isOffDay": True}, {"date": date(2020, 2, 1), "isOffDay": True}, {"date": date(2020, 2, 2), "isOffDay": True}, ], diff --git a/tests/description_parsing_cases.json b/tests/description_parsing_cases.json index 632acab..23cdefb 100644 --- a/tests/description_parsing_cases.json +++ b/tests/description_parsing_cases.json @@ -3,6 +3,7 @@ "year": 2020, "description": "延长2020年春节假期至2月2日(农历正月初九,星期日),2月3日(星期一)起正常上班。", "expected": [ + { "date": "2020-01-31", "isOffDay": true }, { "date": "2020-02-01", "isOffDay": true }, { "date": "2020-02-02", "isOffDay": true }, { "date": "2020-02-03", "isOffDay": false }