Skip to main content

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

相关项目:

Metadata

Release files for cnholiday 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cnholiday 0.2.0
File Size Uploaded Provenance Actions
cnholiday-0.2.0.tar.gz 2.8 kB Without provenance Details for cnholiday-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cnholiday 0.2.0
File Interpreter ABI Platform Actions
cnholiday-0.2.0-py3-none-any.whl Python 3 none any Details for cnholiday-0.2.0-py3-none-any.whl

Total release size: 5.8 kB

Release files / cnholiday-0.2.0.tar.gz

Download URL cnholiday-0.2.0.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1ef7e6e398f69e50caa5b4420026a9bc5b7241a07f3c7c48fed73791e0484b33
BLAKE2b-256 checksum
How to use checksums
c265d81cfb5c4c7ef4834640659d3b552e18b0d44ce5f9fb23096ad5edae280b
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / cnholiday-0.2.0-py3-none-any.whl

Download URL cnholiday-0.2.0-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
589c20de51708868654f14076e580fc7395cbc61c6cd261bae8bd3dd98992e81
BLAKE2b-256 checksum
How to use checksums
00a6f96cdb4d84a8516f6f90cf4dd71c791170a399c4e0da1df09adfdd46393b
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for cnholiday 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page