https://github.com/quansitech/holiday
获取中国法定节假日
https://github.com/quansitech/holiday
Last synced: about 1 month ago
JSON representation
获取中国法定节假日
- Host: GitHub
- URL: https://github.com/quansitech/holiday
- Owner: quansitech
- Created: 2022-12-26T07:10:17.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-26T07:21:38.000Z (over 3 years ago)
- Last Synced: 2025-03-02T23:44:04.563Z (over 1 year ago)
- Language: PHP
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## holiday
```text
获取中国法定假期日历
```
### 用法
```shell
# 下载项目
git clone https://github.com/quansitech/holiday.git
# 执行命令,获取日历数据json
# 年份范围 2010-下一年
# 已经获取过的年份数据会写入文件,文件名为 /src/Calendar/year_calendar.json
php ./holiday.php 2023
```
#### 返回数据说明示例
```php
[
...
{
"date": "2022-12-26",
"year": 2022,
"month": 12,
"day": 26,
"status": 0
}
...
]
```
| 名称 | 类型 | 说明 |
|:----------------|:------------------|-------------------------------------|
| date | string | 日期 |
| year | int | 年 |
| month | int | 月 |
| day | int | 日 |
| status | int | 假期标识:0普通工作日 1周末双休日 2需要补班的工作日 3法定节假日 |
### 其它说明
[日期数据来源](http://api.haoshenqi.top/holiday?date=2022)