LKI / chinese-calendar

判断一天是不是法定节假日/法定工作日(查看节假日安排)
https://pypi.org/project/chinesecalendar/
MIT License
1.06k stars 185 forks source link

是否是节假日问题 #98

Open Viki-researcher opened 1 year ago

Viki-researcher commented 1 year ago

1.is_workday()是True的话,就是工作日+调休日,False的话就是公休日+节假日 2.is_in_lieu()法定节假日是不是调休是什么意思

yzhang318 commented 1 year ago

您好,浏览时看到这个问题,擅自替作者回答下。

is_workday() == True 是工作日,is_workday() == False 是休息不上班。

我看到作者更新的 constants.py 中的相应 in_lieu_days 定义中,应该是对休息日又区分了 “本来存在的假期” 和 “从其他周末调休过来的假期”,例如 2023 年 10 月 5、6 日放假,但是 is_in_lieu() == True ,可能是认为这两天的休息 “调休” 了假期结束后需要工作的 7、8 日(周六、周日)。