查询某天是否放假
Project description
CNHoliday: 查询某天是否放假
数据来源:
| 年份 | 出处 |
|---|---|
| 2019 | 国务院办公厅关于 2019 年部分节假日安排的通知 |
| 2020 | 国务院办公厅关于 2020 年部分节假日安排的通知 |
| 2021 | 国务院办公厅关于 2021 年部分节假日安排的通知 |
安装:
# 不依赖第三方包库
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.2.0.tar.gz
(2.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cnholiday-0.2.0.tar.gz.
File metadata
- Download URL: cnholiday-0.2.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ef7e6e398f69e50caa5b4420026a9bc5b7241a07f3c7c48fed73791e0484b33
|
|
| MD5 |
41055fa85814f6de19b402b6f9d5d3a7
|
|
| BLAKE2b-256 |
c265d81cfb5c4c7ef4834640659d3b552e18b0d44ce5f9fb23096ad5edae280b
|
File details
Details for the file cnholiday-0.2.0-py3-none-any.whl.
File metadata
- Download URL: cnholiday-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
589c20de51708868654f14076e580fc7395cbc61c6cd261bae8bd3dd98992e81
|
|
| MD5 |
b6ae61c26ce1ccd04c5c1935720345c7
|
|
| BLAKE2b-256 |
00a6f96cdb4d84a8516f6f90cf4dd71c791170a399c4e0da1df09adfdd46393b
|