使用须知
1.免费使用,无任何限制,已经挂上Cloudflare的CDN
2.不保证服务的稳定性,但可以保证服务的持久性
3.第二年的放假情况一般是国务院在10月中下旬才会发布
接口地址:
https://holiday-api.mooim.com/v1/{:date}
其中date必须是YYYY-MM-DD格式,且不可省略
样例:
https://holiday-api.mooim.com/v1/2022-07-23
{
"code": 0,
"msg": "OK",
"data": {
"work": {
"genre": 2,
"is_work": false
},
"week": {
"day": 6,
"name": "周六"
},
"lunar": {
"year": "二〇二二",
"month": "六月",
"day": "廿五",
"jie_qi": "大暑",
"traditional": [
"五谷母节"
]
},
"holiday": {},
"next_holiday": {
"name": "中秋节",
"days": 49
}
}
}
样例二:
https://holiday-api.mooim.com/v1/2022-10-02
{
"code": 0,
"msg": "OK",
"data": {
"work": {
"genre": 3,
"is_work": false
},
"week": {
"day": 0,
"name": "周日"
},
"lunar": {
"year": "二〇二二",
"month": "九月",
"day": "初七"
},
"holiday": {
"name": "国庆节",
"info": "假期"
},
"next_holiday": {}
}
}
work.genre的值为1-4,分别为1-工作日 2-周末 3-节假日 4-节假日调班
lunar.traditional为中国传统节日(并非放假),比如重阳节,寒衣节等等
next.next_holiday表示距离下一个法定节日还有多少天