A Python tool for managing Chinese public holidays and compensatory working days. This tool helps you accurately calculate working days while accounting for China's unique holiday schedule.
Project description
cnworkdays
A Python tool for managing Chinese public holidays and compensatory working days. This tool helps you accurately calculate working days while accounting for China's unique holiday schedule.
Features
-
Holiday Announcement Parser: parse official holiday announcements from the General Office of the State Council to generate data for annual public holidays and compensatory working days in China.
-
Working Day Calculator: calculate dates before or after a specified number of working days, taking into account official public holidays and compensatory working days in China.
Installation
pip install cnworkdays
Usage
cnworkdays provides two main commands: holiparse and workcalc.
Holiday Announcement Parser
Launch the web application for parsing holiday announcements:
cnworkdays holiparse
✨ Running marimo app Holiday Announcement Parser
🔗 URL: http://127.0.0.1:8080
By default, the application runs at http://127.0.0.1:8080. To customize the host and port:
cnworkdays holiparse --host 0.0.0.0 --port 9000
✨ Running marimo app Holiday Announcement Parser
🔗 URL: http://0.0.0.0:9000
Working Day Calculator
Launch the web application for calculating working days:
cnworkdays workcalc
✨ Running marimo app Working Day Calculator
🔗 URL: http://127.0.0.1:8080
By default, the application runs at http://127.0.0.1:8080. To customize the host and port:
cnworkdays workcalc --host 0.0.0.0 --port 9000
✨ Running marimo app Working Day Calculator
🔗 URL: http://0.0.0.0:9000
Changelog
2024.1
Release date: 2024-11-14
- Enhance browser application with more descriptive page titles for better user experience.
- Fix the issue that
workcalcgets stuck when negative days are provided.
2024.0
Release date: 2024-11-13
-
Launch
cnworkdaysCLI with two main commands:holiparse: generate data for annual public holidays and compensatory working days based on notifications from the General Office of the State Council.workcalc: calculate the date after or before a specified number of working days, accounting for official public holidays and compensatory working days in China.
-
Add support for date calculations spanning from January 1, 2018, to December 31, 2024
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 cnworkdays-2024.1.tar.gz.
File metadata
- Download URL: cnworkdays-2024.1.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.21.0 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c398742778743214133388a067016e27f25cd72b35b12f390db5a7f5b2ec47b1
|
|
| MD5 |
8b13ad3b480dc9c2357a49662b75b161
|
|
| BLAKE2b-256 |
7203241a5180fb918da959bcbf8fef51ef78a688fb7a9de0f42613ddbb0c7da7
|
File details
Details for the file cnworkdays-2024.1-py3-none-any.whl.
File metadata
- Download URL: cnworkdays-2024.1-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.21.0 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
160e9ed72ecdbe222385add936744af3e2b712fb5c8f151927028dcfdf30fb39
|
|
| MD5 |
e5a5c146e1cefaa3c87146c0a5b500a9
|
|
| BLAKE2b-256 |
963852043fa91af4e0f960aed642b2c5dce7441902dfc84514694517953b6aaa
|