44 lines
1.7 KiB
Markdown
44 lines
1.7 KiB
Markdown
# holiday-cn
|
|
|
|
[](https://travis-ci.org/NateScarlet/holiday-cn) [](https://github.com/NateScarlet/holiday-cn/releases/latest) [](http://calver.org) [](https://codeclimate.com/github/NateScarlet/holiday-cn/maintainability) [](https://codeclimate.com/github/NateScarlet/holiday-cn/test_coverage) 
|
|
|
|
中国法定节假日数据 自动每日抓取国务院公告
|
|
|
|
- [x] 提供 JSON 格式节假日数据
|
|
- [x] CI 自动更新
|
|
- [x] 数据变化时时自动发布新版本 ( `Watch` - `Release only` 以获取邮件提醒! )
|
|
- [x] [发布页面]提供 JSON 打包下载
|
|
|
|
数据格式:
|
|
|
|
[JSON Schema](./schema.json)
|
|
|
|
```TypeScript
|
|
interface Holidays {
|
|
/** 完整年份, 整数。*/
|
|
year: number;
|
|
/** 所用国务院文件网址列表 */
|
|
papers: string[];
|
|
days: {
|
|
/** 节日名称 */
|
|
name: string;
|
|
/** 日期, ISO 8601 格式 */
|
|
date: string;
|
|
/** 是否为休息日 */
|
|
isOffDay: boolean;
|
|
}[]
|
|
}
|
|
```
|
|
|
|
## 通过互联网使用
|
|
|
|
数据地址格式:
|
|
|
|
https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/{年份}.json
|
|
|
|
## 作为 git 子模块使用
|
|
|
|
参见 [Git 工具 - 子模块](https://git-scm.com/book/zh/v2/Git-%E5%B7%A5%E5%85%B7-%E5%AD%90%E6%A8%A1%E5%9D%97)
|
|
|
|
[发布页面]: https://github.com/NateScarlet/holiday-cn/releases
|