中国法定节假日数据,自动抓取国务院公告。
- 提供 JSON 格式节假日数据(2016年至今)
- 提供 ICalendar 格式节假日数据(2016年至今)
- GitHub Actions 自动更新
- 数据变化时自动发布新版本
- 提供 all.json 和 all.ics 整合文件
单年数据格式:
{
"year": 2025,
"papers": ["https://www.gov.cn/zhengce/zhengceku/202411/content_6986383.htm"],
"days": [
{
"name": "元旦",
"date": "2025-01-01",
"isOffDay": true
}
]
}所有年份整合数据格式:
{
"years": {
"start": 2016,
"end": 2027
},
"papers": ["https://www.gov.cn/zhengce/zhengceku/202411/content_6986383.htm"],
"days": [
{
"name": "元旦",
"date": "2025-01-01",
"isOffDay": true
}
]
}- 国内用户:推荐使用 gh-proxy 或 mirror.ghproxy.com 加速访问
- 国际用户:推荐使用 jsDelivr CDN
- 稳定性要求高:建议自行搭建静态文件服务
单年 JSON 数据地址:
https://raw.githubusercontent.com/lwx-cloud/china-holiday/main/{年份}.json
单年 ICalendar 订阅地址:
https://raw.githubusercontent.com/lwx-cloud/china-holiday/main/{年份}.ics
所有年份整合 JSON 数据地址:
https://raw.githubusercontent.com/lwx-cloud/china-holiday/main/all.json
所有年份整合 ICalendar 订阅地址:
https://raw.githubusercontent.com/lwx-cloud/china-holiday/main/all.ics
gh-proxy(GitHub 文件代理):
https://ghproxy.com/https://raw.githubusercontent.com/lwx-cloud/china-holiday/main/{年份}.json
https://ghproxy.com/https://raw.githubusercontent.com/lwx-cloud/china-holiday/main/all.json
GitHub 文件加速:
https://mirror.ghproxy.com/https://raw.githubusercontent.com/lwx-cloud/china-holiday/main/{年份}.json
https://mirror.ghproxy.com/https://raw.githubusercontent.com/lwx-cloud/china-holiday/main/all.json
FastGit(GitHub 加速):
https://cdn.jsdelivr.net/gh/lwx-cloud/china-holiday@main/{年份}.json
单年 JSON 数据地址:
https://cdn.jsdelivr.net/gh/lwx-cloud/china-holiday@main/{年份}.json
单年 ICalendar 订阅地址:
https://cdn.jsdelivr.net/gh/lwx-cloud/china-holiday@main/{年份}.ics
所有年份整合 JSON 数据地址:
https://cdn.jsdelivr.net/gh/lwx-cloud/china-holiday@main/all.json
所有年份整合 ICalendar 订阅地址:
https://cdn.jsdelivr.net/gh/lwx-cloud/china-holiday@main/all.ics
使用 release 版本(需先在 GitHub 创建 release):
https://cdn.jsdelivr.net/gh/lwx-cloud/china-holiday@{版本号}/{年份}.json
pip install -r requirements.txt
python scripts/fetch.py 2025pip install -r dev-requirements.txt
make format
make lint
make test本项目参考了 NateScarlet/holiday-cn 项目的设计思路和实现方式,感谢原作者的开源贡献。
本项目使用 AI 辅助创建和优化,包括:
- 代码生成和优化
- 文档编写
- GitHub Actions 配置
- 项目结构设计
