🇯🇵澳洲节假日
判断某年某月某一天是不是工作日/节假日。 支持 2023~2024年
安装
pip install australianscalendar
升级
pip install -U australianscalendar
澳洲的公众假期无调休,假期预测相比较很容易
样例
import datetime
# 判断 2023年1月1号 是不是节假日
from australians_calendar import is_holiday, is_workday
new_year = datetime.date(2023, 1, 1)
assert is_workday(new_year) is False
assert is_holiday(new_year) is True
# 或者在判断的同时,获取节日名
import australians_calendar as calendar # 也可以这样 import
on_holiday, holiday_name = calendar.get_holiday_detail(new_year)
assert on_holiday is True
assert holiday_name == calendar.Holiday.new_years_day.value
其它语言
假如你没法使用Python, 你也可以转译现成的常量文件来获取最全的节假日安排表。
贡献代码
致谢
本项目参考了LKI的chinese-calendar,感谢开发者的付出
Metadata
Release files for australianscalendar 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| australianscalendar-1.0.0.tar.gz | 12.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| australianscalendar-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.3 kB
Release files / australianscalendar-1.0.0.tar.gz
| Download URL | australianscalendar-1.0.0.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c07ef5bec9097ff058915f0e051fbf4e05567caad0fdde91c3cfa8c3478fad60
|
|
BLAKE2b-256 checksum How to use checksums |
9010ea4ac49083a8fa3d63c6cf09bf0fd609a6296d6ed63e5b6bd880dc5cdefc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.18
|
Release files / australianscalendar-1.0.0-py3-none-any.whl
| Download URL | australianscalendar-1.0.0-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4c51bde4e0f2a376dbdcd8b0c0096728c878af4cdf3ad7f72f6b678cc6c41de
|
|
BLAKE2b-256 checksum How to use checksums |
6f1a098f4e53247f69f3fc42cb2857b733ca7da28fb66f07b8a2cdb959c79c82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.18
|