golang-module / carbon

A simple, semantic and developer-friendly golang package for time

Home Page:https://pkg.go.dev/github.com/golang-module/carbon/v2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong zodiac sign

fishjar opened this issue · comments

commented

Hello,

I encountered an issue with the following code:

	s := "2024-02-04 13:14:15"
	fmt.Printf("%s IsDragonYear? %v\n", s, carbon.Parse(s).Lunar().IsDragonYear())

I expected to get:

2024-02-04 13:14:15 IsDragonYear? true

But I actually get:

2024-02-04 13:14:15 IsDragonYear? false

Thanks!

commented

是我搞错了,依据 《农历的编算和颁行》GB/T 33661-2017:

  • 农历正月初一为生肖和干支年转换日

The issue body's language is not English, translate it automatically, please use English next time. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I made a mistake. According to "Compilation and Promulgation of the Lunar Calendar" GB/T 33661-2017:

  • The first day of the first month of the lunar calendar is the day of conversion between the zodiac signs and the year of the zodiac signs.