查询中国传统节日、二十四节气、欧美主流节日。
首次使用前确保依赖已安装(通常已预装):
pip install --break-system-packages zhdate holidays
脚本路径:scripts/festival_query.py
输入公历日期,返回农历信息、传统节日、节气、西方节日:
python3 scripts/festival_query.py --date YYYY-MM-DD
示例:
python3 scripts/festival_query.py --date 2025-10-06 # 中秋节
python3 scripts/festival_query.py --date 2025-01-29 # 春节
python3 scripts/festival_query.py --date 2025-12-25 # 圣诞节
列出指定年份所有节日和节气:
python3 scripts/festival_query.py --year YYYY
列出指定月份所有节日和节气:
python3 scripts/festival_query.py --month YYYY-MM
仅显示节气日期表:
python3 scripts/festival_query.py --terms YYYY
共 1 个版本