查询某天是否放假
Project description
CNHoliday: 查询某天是否放假
数据来源:
年份 | 出处 |
---|---|
2019 | 国务院办公厅关于 2019 年部分节假日安排的通知 |
2020 | 国务院办公厅关于 2020 年部分节假日安排的通知 |
安装:
# 不依赖第三方包库
pip install cnholiday
用法:
>>> from datetime import datetime
>>>
>>> from cnholiday import CNHoliday
>>>
>>>
>>> cnholiday = CNHoliday()
>>> _day = datetime(2019, 10, 1)
>>> print(cnholiday.check(_day))
True
>>> print(cnholiday.check_shift(_day))
True
>>> print(cnholiday.check_shift(_day, shift=2))
True
>>> print(cnholiday.check_shift(_day, shift=3))
True
相关项目:
- GitHub 上有另一个同名项目 https://github.com/valaxy/cnholiday
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cnholiday-0.1.1a4.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for cnholiday-0.1.1a4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7eac4a1602d69bdbd3fbdd0e75aaab14d10d607967fc4b650f941b7a6cd1c059 |
|
MD5 | 7c5cd4f9f41f243b50525ac295103f4f |
|
BLAKE2b-256 | 3339324b29d33802b945293d0423e85993bd68ec2297389a7b2c5beae7e951d7 |