Skip to main content

cn_workday

Workday detection for the People's Republic of China.

Installation

pip install -U cn_workday

Usage

This package provides only a single function currently.

>>> from cn_workday import is_workday
>>> from datetime import datetime
>>> is_workday(datetime.now())
>>> ...

Data files

This package is based on data files in CSV formats. They are stored in data directory inside the package. Each file contains the official holidays and their tradeoffs (if any).

Currently we only have data files from 2017 to 2020. If you'd like to contribute, please take a look at the existing data files.

The official holiday definitions of the next year is usually published in November by Chinese government, you can find them here. Each data file should also contain a link to the official announcement, as a comment at the end of file.

Notice

This package is currently not compatible with PyOxidizer due to its using of __file__ (to load data files). Until there is a recommended way to handle data files, this is likely to stay the same. Read more here.

Metadata

Release files for cn-workday 2020.1.27.1

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

Source distribution (sdist)

Source distribution for cn-workday 2020.1.27.1
File Size Uploaded
cn_workday-2020.1.27.1.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cn-workday 2020.1.27.1
File Interpreter ABI Platform
cn_workday-2020.1.27.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.6 kB

Release files / cn_workday-2020.1.27.1.tar.gz

Download URL cn_workday-2020.1.27.1.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0b1428bc8fdffc48479e10a51e2da5470746991eaa527041cba63d27e5598561
BLAKE2b-256 checksum
How to use checksums
85e361fa60e066c18fbe04eafe449de7054e2ab2be216040ebd782a5f4a69c55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.1

Release files / cn_workday-2020.1.27.1-py3-none-any.whl

Download URL cn_workday-2020.1.27.1-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ad05a6eb8c8d6417076b3bcfb56681d4e051c489aff60a469d23b0f16832846
BLAKE2b-256 checksum
How to use checksums
b2bd4ddd199244563fa9cf8eb5b13150654ac6f31aae5a8790694ab0b5a9e472
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.1

Release history Release notifications | RSS feed

This release

2020.1.27.1 This release

2 release files

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