Skip to main content

Workday detection for China

Project description


Workday detection for the People's Republic of China.


pip install -U cn_workday


This package provides only a single function currently.

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

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.


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.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for cn-workday, version 2020.1.14.1
Filename, size File type Python version Upload date Hashes
Filename, size cn_workday-2020.1.14.1-py3-none-any.whl (6.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size cn_workday-2020.1.14.1.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page