Chinese holiday for Python
Project description
Utility from parsing Chinese holiday from official website
Install
pip install Chinese-holiday
Usage
Check if one day is a holiday (including normal weekend, not including working weekend)
is_holiday('2019-10-10')
Search url for notice of 2020 holiday
search_notice_url('2020')
Parse holiday info from url
parse_holiday_info(url)
Return holiday data from cache
get_holiday_data('2020')
Forcely return holiday data from website
get_holiday_data('2020', True)
Get latest work day (default fome today)
get_latest_workday()
Cache
The utility will cache parsed result into holiday.json, you can use
is_holiday('2019-10-10', True)
to forcely refresh it.
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
File details
Details for the file Chinese-holiday-0.1.6.tar.gz
.
File metadata
- Download URL: Chinese-holiday-0.1.6.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9cc428d449f15479c14ab707344bea80aef3ef7f4510c375339b80123c75cf2 |
|
MD5 | 062f71e496a1ac6fe0a2a48fd20c0977 |
|
BLAKE2b-256 | 5546a76e835d491527f25f246af06e819208ded81fc630473f1d9714c0a8c24a |