Skip to content

neolee/holiday-cn

 
 

Repository files navigation

holiday-cn

Build Status CalVer

中国法定节假日数据 自动每日抓取国务院公告

  • 提供 JSON 格式节假日数据
  • CI 自动更新

数据格式:

JSON Schema

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

注意事项

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

通过互联网使用

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

数据地址格式:

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

或使用 JSDelivr:

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

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

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

ICalendar 订阅

网址格式参见上一节

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

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

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

作为 git 子模块使用

参见 Git 工具 - 子模块

About

中国法定节假日数据,每日自动抓取国务院公告生成数据文件

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.0%
  • Makefile 1.0%