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

判断某一天是否为节假日当天 #28

Open
Cyrus-Jiang opened this issue Oct 2, 2018 · 4 comments
Open

判断某一天是否为节假日当天 #28

Cyrus-Jiang opened this issue Oct 2, 2018 · 4 comments
Labels
Milestone

Comments

@Cyrus-Jiang
Copy link

现在发现一个问题,比如国庆节七天假,十月一号返回节日名称没问题,但是之后的几天加也会返回国庆节,虽也说得过去,但是如果要实现在节日当天发送祝福语的话,就不能以此为准了,在十月一日之后的几天节日里每天提醒国庆节是不大合适的。烦请指点是否存在可区分实际节日当天和假日的解决方案
today = datetime.now()
on_holiday, holiday_name = calendar.get_holiday_detail(today)
return on_holiday, holiday_name

@LKI
Copy link
Owner

LKI commented Oct 2, 2018

呃,这是一个好的问题。
目前库的实现中关于 节假日 的说法都其实是 节假日期间,的确实现不了 节假日当天 的逻辑。

会在下个版本中实现。

@LKI LKI added this to the v1.2 milestone Oct 2, 2018
@LKI LKI added the feature label Oct 2, 2018
@LKI LKI changed the title 关于获取节假日名称的问题 判断某一天是否为节假日当天 Oct 2, 2018
@Cyrus-Jiang
Copy link
Author

感谢回复,期待新的版本

@fhrl94
Copy link
Contributor

fhrl94 commented Dec 7, 2018

可以单独维护一个 <节假日>表哦, 归属于<节假日期间>

@czj6
Copy link

czj6 commented Jun 9, 2023

大佬,这个功能新增好了嘛

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

No branches or pull requests

4 participants