6tail / lunar-go

日历、公历(阳历)、农历(阴历、老黄历)、道历、佛历,支持节假日、星座、儒略日、干支、生肖、节气、节日、彭祖百忌、每日宜忌、吉神宜趋凶煞宜忌、吉神(喜神/福神/财神/阳贵神/阴贵神)方位、胎神方位、冲煞、纳音、星宿、八字、五行、十神、建除十二值星、青龙名堂等十二神、黄道黑道日及吉凶等。lunar is a calendar library for Solar and Chinese Lunar.
https://6tail.cn/calendar/api.html
MIT License
215 stars 57 forks source link

节气计算问题 #11

Closed kongfei605 closed 10 months ago

kongfei605 commented 10 months ago
package main

import (
    "fmt"
    "github.com/6tail/lunar-go/calendar"
)

func main() {
    solar := calendar.NewSolar(1987, 8, 15, 12, 0, 0)
    lunar := solar.GetLunar()
    fmt.Printf("节气:%s %s\n",
        lunar.GetNextJie().GetSolar().ToYmdHms(), lunar.GetNextJieQi().GetName())
}

输出

节气: 1987-09-08 12:24:07 处暑

经过查询,1987-09-08 是白露

https://rili.ximizi.com/wannianli/1987/4505-19870908.html https://jieqi.bmcx.com/1987_bailu__jieqi/

kongfei605 commented 10 months ago

sorry,搞错了~