2026-04-27 12:51:35 +08:00
2019-03-12 23:07:53 +08:00
2019-03-08 00:19:43 +08:00
2023-08-17 23:05:29 +08:00
2023-08-17 23:05:29 +08:00
2023-08-17 23:05:29 +08:00
2023-08-17 23:05:29 +08:00
2023-08-17 23:05:29 +08:00
2023-08-17 23:05:29 +08:00
2023-08-17 23:05:29 +08:00
2023-08-17 23:05:29 +08:00
2023-08-17 23:05:29 +08:00
2023-08-17 23:05:29 +08:00
2023-08-17 23:05:29 +08:00
2023-08-17 23:05:29 +08:00
2023-08-17 23:05:29 +08:00
2023-08-17 23:05:29 +08:00
2023-08-17 23:05:29 +08:00
2023-08-17 23:05:29 +08:00
2023-08-17 23:05:29 +08:00
2023-10-25 03:11:15 +00:00
2024-11-12 12:30:13 +00:00
2019-03-05 10:56:09 +08:00
2024-11-12 20:41:06 +08:00
2024-11-16 14:47:22 +08:00
2019-09-11 23:00:55 +08:00

holiday-cn

Build Status Release CalVer JSDelivr Maintenance

中国大陆及香港节假日数据

  • 中国大陆:自动每日抓取国务院公告

  • 香港:来源于香港特别行政区政府 1823.gov.hk,数据覆盖 2024 年起

  • 提供 JSON 格式节假日数据

  • CI 自动更新

  • 数据变化时自动发布新版本 ( Watch - Release only 以获取邮件提醒! )

  • 发布页面提供 JSON 打包下载

数据格式(中国大陆、香港通用):

JSON Schema

interface Holidays {
  /** 完整年份, 整数。*/
  year: number;
  /** 所用数据来源网址列表 */
  papers: string[];
  days: {
    /** 节日名称 */
    name: string;
    /** 日期, ISO 8601 格式 */
    date: string;
    /** 是否为休息日 */
    isOffDay: boolean;
  }[]
}

注意事项

中国大陆

  • 年份是按照国务院文件标题年份而不是日期年份12 月份的日期可能会被下一年的文件影响,因此应检查两个文件。

  • 与周末连休 的周末不是法定节假日,数据里不会包含,见《全国年节及纪念日放假办法》 #213 #221

香港

  • 香港不设调休补班制度,数据中不会出现 isOffDay: false 的条目。
  • 假期名称为繁体中文。
  • 数据覆盖范围取决于港府发布进度,通常提前公布至次年。

通过互联网使用

提示:任何第三方服务都可能故障或停止服务,如果稳定性要求高请自己搭建静态文件服务。

中国大陆

https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/{年份}.json

或使用 JSDelivr

https://cdn.jsdelivr.net/gh/NateScarlet/holiday-cn@master/{年份}.json

https://fastly.jsdelivr.net/gh/NateScarlet/holiday-cn@master/{年份}.json

也可尝试使用 ghproxy 或其他 Github 加速:

https://{ghproxy服务}/https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/{年份}.json

访问 github 不方便时可使用国内镜像仓库 2022-08-05: coding 现在要求登录才能下载开源仓库的文件。

https://natescarlet.coding.net/p/github/d/holiday-cn/git/raw/master/{年份}.json

香港

https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/hk/{年份}.json

ICalendar 订阅

中国大陆

{年份}.ics 为对应年份的节假日

holiday-cn.ics 为 3 年前至次年的节假日

香港

hk/{年份}.ics 为对应年份的节假日

holiday-hk.ics 为 3 年前至次年的节假日

感谢 @retanoj 的 ics 格式转换实现

作为 git 子模块使用

参见 Git 工具 - 子模块

Description
No description provided
Readme 412 KiB
Languages
Python 99.1%
Makefile 0.9%