{"id":15032869,"url":"https://github.com/natescarlet/holiday-cn","last_synced_at":"2025-05-14T15:07:06.372Z","repository":{"id":36140274,"uuid":"173861772","full_name":"NateScarlet/holiday-cn","owner":"NateScarlet","description":"📅🇨🇳中国法定节假日数据 自动每日抓取国务院公告","archived":false,"fork":false,"pushed_at":"2025-05-07T20:37:41.000Z","size":295,"stargazers_count":1463,"open_issues_count":2,"forks_count":161,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-07T21:36:12.808Z","etag":null,"topics":["china","crawling","data","holiday","natural-language-processing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NateScarlet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-03-05T02:56:09.000Z","updated_at":"2025-05-07T20:37:44.000Z","dependencies_parsed_at":"2023-02-17T02:46:15.303Z","dependency_job_id":"4e8def72-824f-4db2-8201-3614fd12a46f","html_url":"https://github.com/NateScarlet/holiday-cn","commit_stats":{"total_commits":373,"total_committers":8,"mean_commits":46.625,"dds":0.6112600536193029,"last_synced_commit":"29869ddebfb65c53a4870315330266839477fea6"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NateScarlet%2Fholiday-cn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NateScarlet%2Fholiday-cn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NateScarlet%2Fholiday-cn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NateScarlet%2Fholiday-cn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NateScarlet","download_url":"https://codeload.github.com/NateScarlet/holiday-cn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254169537,"owners_count":22026212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["china","crawling","data","holiday","natural-language-processing"],"created_at":"2024-09-24T20:19:38.205Z","updated_at":"2025-05-14T15:07:06.346Z","avatar_url":"https://github.com/NateScarlet.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# holiday-cn\n\n[![Build Status](https://github.com/NateScarlet/holiday-cn/workflows/CI/badge.svg)](https://github.com/NateScarlet/holiday-cn/actions)\n[![Release](https://img.shields.io/github/release/NateScarlet/holiday-cn.svg)](https://github.com/NateScarlet/holiday-cn/releases/latest)\n[![CalVer](https://img.shields.io/badge/calver-YYYY.0M.0D-22bfda.svg)](http://calver.org)\n[![JSDelivr](https://data.jsdelivr.com/v1/package/gh/NateScarlet/holiday-cn/badge?style=rounded)](https://www.jsdelivr.com/package/gh/NateScarlet/holiday-cn)\n![Maintenance](https://img.shields.io/maintenance/yes/2025.svg)\n\n中国法定节假日数据 自动每日抓取国务院公告\n\n- [x] 提供 JSON 格式节假日数据\n- [x] CI 自动更新\n- [x] 数据变化时自动发布新版本 ( `Watch` - `Release only` 以获取邮件提醒! )\n- [x] [发布页面]提供 JSON 打包下载\n\n数据格式:\n\n[JSON Schema](./schema.json)\n\n```TypeScript\ninterface Holidays {\n  /** 完整年份, 整数。*/\n  year: number;\n  /** 所用国务院文件网址列表 */\n  papers: string[];\n  days: {\n    /** 节日名称 */\n    name: string;\n    /** 日期, ISO 8601 格式 */\n    date: string;\n    /** 是否为休息日 */\n    isOffDay: boolean;\n  }[]\n}\n```\n\n## 注意事项\n\n- 年份是按照国务院文件标题年份而不是日期年份，12 月份的日期可能会被下一年的文件影响，因此应检查两个文件。\n\n- `与周末连休` 的周末不是法定节假日，数据里不会包含，见[《全国年节及纪念日放假办法》](https://www.gov.cn/zhengce/content/202411/content_6986380.htm) [#213](https://github.com/NateScarlet/holiday-cn/issues/213#issuecomment-1869546011) [#221](https://github.com/NateScarlet/holiday-cn/issues/221)\n\n## 通过互联网使用\n\n提示：任何第三方服务都可能故障或停止服务，如果稳定性要求高请自己搭建静态文件服务。\n\n数据地址格式:\n\n`https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/{年份}.json`\n\n或使用 JSDelivr：\n\n`https://cdn.jsdelivr.net/gh/NateScarlet/holiday-cn@master/{年份}.json`\n\n`https://fastly.jsdelivr.net/gh/NateScarlet/holiday-cn@master/{年份}.json`\n\n也可尝试使用 [ghproxy](https://github.com/hunshcn/gh-proxy) 或其他 Github 加速：\n\n`https://{ghproxy服务}/https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/{年份}.json`\n\n~~访问 github 不方便时可使用国内镜像仓库~~ 2022-08-05: coding 现在要求登录才能下载开源仓库的文件。\n\n~~`https://natescarlet.coding.net/p/github/d/holiday-cn/git/raw/master/{年份}.json`~~\n\n## ICalendar 订阅\n\n网址格式参见上一节\n\n`{年份}.ics` 为对应年份的节假日\n\n`holiday-cn.ics` 为 3 年前至次年的节假日\n\n感谢 @retanoj 的 ics 格式转换实现\n\n## 作为 git 子模块使用\n\n参见 [Git 工具 - 子模块](https://git-scm.com/book/zh/v2/Git-%E5%B7%A5%E5%85%B7-%E5%AD%90%E6%A8%A1%E5%9D%97)\n\n[发布页面]: https://github.com/NateScarlet/holiday-cn/releases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatescarlet%2Fholiday-cn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatescarlet%2Fholiday-cn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatescarlet%2Fholiday-cn/lists"}