接口地址: https://api.youyacao.com/api/yinliyanglizhuan
返回格式: JSON
请求方式: GET
请求示例: https://api.youyacao.com/api/yinliyanglizhuan?data=2024-02-23&type=solar
名称 | 必填 | 类型 | 说明 |
---|---|---|---|
data | 是 | date | 指定日期,格式为YYYY-MM-DD |
type | 是 | string | "solar" (阳历)或 "lunar"(阴历) |
名称 | 类型 | 说明 |
---|
{ "code": 200, "msg": "success", "data": { "data": { "lunar_year": "2024", "lunar_month": "02", "lunar_day": "23", "lunar_hour": null, "lunar_year_chinese": "二零二四", "lunar_month_chinese": "二月", "lunar_day_chinese": "廿三", "lunar_hour_chinese": null, "ganzhi_year": "甲辰", "ganzhi_month": "丁卯", "ganzhi_day": "乙未", "ganzhi_hour": null, "wuxing_year": "木土", "wuxing_month": "火木", "wuxing_day": "木土", "wuxing_hour": null, "color_year": "青", "color_month": "红", "color_day": "青", "color_hour": null, "animal": "龙", "term": null, "is_leap": false, "gregorian_year": "2024", "gregorian_month": "04", "gregorian_day": "01", "gregorian_hour": null, "week_no": 1, "week_name": "星期一", "is_today": false, "constellation": "白羊", "is_same_year": true }, "type": "lunar" } }
请求参数设置:
参数名称 | 参数值 |
---|---|
{ "code": 200, "msg": "success", "data": { "data": { "lunar_year": "2024", "lunar_month": "02", "lunar_day": "23", "lunar_hour": null, "lunar_year_chinese": "二零二四", "lunar_month_chinese": "二月", "lunar_day_chinese": "廿三", "lunar_hour_chinese": null, "ganzhi_year": "甲辰", "ganzhi_month": "丁卯", "ganzhi_day": "乙未", "ganzhi_hour": null, "wuxing_year": "木土", "wuxing_month": "火木", "wuxing_day": "木土", "wuxing_hour": null, "color_year": "青", "color_month": "红", "color_day": "青", "color_hour": null, "animal": "龙", "term": null, "is_leap": false, "gregorian_year": "2024", "gregorian_month": "04", "gregorian_day": "01", "gregorian_hour": null, "week_no": 1, "week_name": "星期一", "is_today": false, "constellation": "白羊", "is_same_year": true }, "type": "lunar" } }
错误码格式说明:
名称 | 类型 | 说明 |
---|
代码示例:
使用案例平台查看
平台名称 | 平台图标 | 平台地址 |
---|