solar date to lunar date, lunar date to solar date
package main
import (
"fmt"
"github.com/yaltachen/calendar"
)
func main() {
lunarDate, err := calendar.NewLunarDate(1900, 1, 1, calendar.NORMALMONTH)
if err != nil {
panic(err)
}
//{1900 1 31}
fmt.Println(lunarDate.Lunar2Solar())
solarDate, err := calendar.NewSolarDate(1900, 1, 31)
if err != nil {
panic(err)
}
//{1900 1 1 false}
fmt.Println(solarDate.Solar2Lunar())
}