查询指定日期的农历信息
   
    
    
    接口功能
   
给予一个日期,输出当前日期的农历详细信息,包含节气,是否假日等信息。
    
    
    访问方式
   
| – | – | 
|---|---|
| 请求方式 | GET | 
| 请求地址 | { {host}}/openapi/icalendar/queryDate | 
| 传输协议 | HTTP | 
    
    
    请求参数
   
| 参数 | 必填 | 类型 | 默认 | 描述 | 
|---|---|---|---|---|
| date | 是 | String | – | 当前日期,yyyy-MM-dd格式 | 
    
    
    请求示例
   
    http://{{host}}/openapi/icalendar/queryDate?date=2020-06-01
    
    
    响应参数
   
| 参数 | 必填 | 类型 | 描述 | 
|---|---|---|---|
| iYear | 是 | int | 农历年 | 
| iMonth | 是 | int | 农历月 | 
| iDay | 是 | int | 农历日 | 
| iMonthChinese | 是 | String | 农历中文月 | 
| iDayChinese | 是 | String | 农历中文日 | 
| sYear | 是 | int | 公历年 | 
| sMonth | 是 | int | 公历月 | 
| sDay | 是 | int | 公历日 | 
| cYear | 是 | String | 年柱 | 
| cMonth | 是 | String | 月柱 | 
| cDay | 是 | String | 日柱 | 
| isHoliday | 是 | boolean | 是否节假日 | 
| isLeap | 是 | boolean | 是否闰月 | 
| solarFestival | 是 | String | 公历节日 | 
| solarTerms | 是 | String | 节气 | 
| lunarFestival | 是 | String | 农历节日 | 
| week | 是 | String | 星期 | 
    
    
    响应示例
   
{
    "code": 0,
    "msg": "SUCCESS",
    "time": 1591263463499,
    "data": {
        "iYear": 2020,
        "iMonth": 3,
        "iDay": 12,
        "iMonthChinese": "三月",
        "iDayChinese": "十二",
        "sYear": 2020,
        "sMonth": 4,
        "sDay": 4,
        "cYear": "庚子年",
        "cMonth": "庚辰",
        "cDay": "丁丑",
        "isHoliday": false,
        "isLeap": false,
        "solarFestival": "",
        "solarTerms": "清明",
        "lunarFestival": "",
        "week": "六"
    }
}
    
    
    查询指定月份的日历详情
   
    
    
    接口功能
   
给予年月,输出当月的日历详情,包含节气,是否假日等信息。
    
    
    访问方式
   
| – | – | 
|---|---|
| 请求方式 | GET | 
| 请求地址 | { {host}}/openapi/icalendar/queryMonth | 
| 传输协议 | HTTP | 
    
    
    请求参数
   
| 参数 | 必填 | 类型 | 默认 | 描述 | 
|---|---|---|---|---|
| date | 是 | String | – | 年月,yyyy-MM格式 | 
    
    
    请求示例
   
    http://{{host}}/openapi/icalendar/queryMonth?date=2020-06
    
    
    响应参数
   
| 参数 | 必填 | 类型 | 描述 | 
|---|---|---|---|
| date | 是 | String | 查询的年月 | 
| list | 是 | List | 日期集合 | 
| list.iYear | 是 | int | 农历年 | 
| list.iMonth | 是 | int | 农历月 | 
| list.iDay | 是 | int | 农历日 | 
| list.iMonthChinese | 是 | String | 农历中文月 | 
| list.iDayChinese | 是 | String | 农历中文日 | 
| list.sYear | 是 | int | 公历年 | 
| list.sMonth | 是 | int | 公历月 | 
| list.sDay | 是 | int | 公历日 | 
| list.cYear | 是 | String | 年柱 | 
| list.cMonth | 是 | String | 月柱 | 
| list.cDay | 是 | String | 日柱 | 
| list.isHoliday | 是 | boolean | 是否节假日 | 
| list.isLeap | 是 | boolean | 是否闰月 | 
| list.solarFestival | 是 | String | 公历节日 | 
| list.solarTerms | 是 | String | 节气 | 
| list.lunarFestival | 是 | String | 农历节日 | 
| list.week | 是 | String | 星期 | 
    
    
    响应示例
   
{
    "code": 0,
    "msg": "SUCCESS",
    "time": 1591263927309,
    "data": {
        "date": "2020-06",
        "list": [
            {
                "iYear": 2020,
                "iMonth": 4,
                "iDay": 10,
                "iMonthChinese": "四月",
                "iDayChinese": "初十",
                "sYear": 2020,
                "sMonth": 6,
                "sDay": 1,
                "cYear": "庚子年",
                "cMonth": "辛巳",
                "cDay": "乙亥",
                "isHoliday": false,
                "isLeap": true,
                "solarFestival": " 国际儿童节",
                "solarTerms": "",
                "lunarFestival": "",
                "week": "一"
            },
            ...
        ]
    }
}
    
    
    附
   
 
版权声明:本文为nbskycity原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
