Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

是否可以增加 周末休息日调休为工作日 这样一个字段 #68

Open
cymx66688 opened this issue Jun 2, 2021 · 2 comments
Milestone

Comments

@cymx66688
Copy link

由于节假日的影响,上下两周的双休会部分调整为工作日,对实际的数据产生影响,希望可以增加这样一个字段,十分感谢。

@LKI
Copy link
Owner

LKI commented Jun 2, 2021

提议很棒~可以加入更新套餐。

目前要做的话可以通过 weekday + is_workday 判断,样例如下:

day = datetime.date(2021,5,8)
if day.weekday() in (5, 6) and chinese_calendar.is_workday(day):
    print("{} 是调休工作日".format(day))

@LKI LKI added this to the v2.0 milestone Jun 2, 2021
@cymx66688
Copy link
Author

哈哈,期待。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants