Closed shiba2046 closed 4 years ago
这个目前可以用内置的 datetime.date.isoweekday
来判断
比如:
import datetime
import chinese_calendar
date = datetime.date(2020,2,1)
is_holiday = chinese_calendar.is_holiday(date)
is_weekend = date.isoweekday() >= 6
if is_holiday or is_weekend:
print("可以休息")
else:
print("需要工作")
金融行业中,就算是因为调休周末需要工作时,也是休息,不工作的。能否加个参数来忽略周末调休的情况?
比如 2020年2月1日:
实际这是一个周六,也是假日。