Versions in this module Expand all Collapse all v1 v1.0.2 Nov 28, 2024 v1.0.0 Aug 3, 2023 Changes in this version + const MaxYear + const MinYear + var AnimalTable = []string + var CST = time.FixedZone("CST", 3600 * 8) + var GanTable = []string + var JieQiCTable = [2][24]float64 + var JieQiTable = []string + var JieQiTableBase = []int + var JieQiTableIdx = "0123415341536789:;<9:=<>:=1>?012@015@015@015AB78CDE8CD=1FD01GH01GH01IH01IJ0KLMN;LMBEOPDQRST0RUH0RVH0RWH0RWM0XYMNZ[MB\\]PT^_ST`_WH`_WH`_WM`_WM`aYMbc[Mde]Sfe]gfh_gih_Wih_WjhaWjka[jkl[jmn]ope]qph_qrh_sth_W" + var JieQiTableOffset = "211122112122112121222211221122122222212222222221222122222232222222222222222233223232223232222222322222112122112121222211222122222222222222222222322222112122112121222111211122122222212221222221221122122222222222222222222223222232222232222222222222112122112121122111211122122122212221222221221122122222222222222221211122112122212221222211222122222232222232222222222222112122112121111111222222112121112121111111222222111121112121111111211122112122112121122111222212111121111121111111111122112122112121122111211122112122212221222221222211111121111121111111222111111121111111111111111122112121112121111111222111111111111111111111111122111121112121111111221122122222212221222221222111011111111111111111111122111121111121111111211122112122112121122211221111011111101111111111111112111121111121111111211122112122112221222211221111011111101111111110111111111121111111111111111122112121112121122111111011111121111111111111111011111111112111111111111011111111111111111111221111011111101110111110111011011111111111111111221111011011101110111110111011011111101111111111211111001011101110111110110011011111101111111111211111001011001010111110110011011111101111111110211111001011001010111100110011011011101110111110211111001011001010011100110011001011101110111110211111001010001010011000100011001011001010111110111111001010001010011000111111111111111111111111100011001011001010111100111111001010001010000000111111000010000010000000100011001011001010011100110011001011001110111110100011001010001010011000110011001011001010111110111100000010000000000000000011001010001010011000111100000000000000000000000011001010001010000000111000000000000000000000000011001010000010000000" + var LunarFestivals = FestivalMap + var LunarZero = NewLunar(MinYear, 1, 1, 0, 0, 0, 0, false) + var SolarFestivals = FestivalMap + var ZhiTable = []string + func AnimalYear(year int) string + func DiffYMD(year, month, day, targetYear, targetMonth, targetDay int) int + func Gan(x int) string + func GanZhi(x int) string + func GanZhiYMD(sYear, sMonth, sDay int) (gzYear, gzMonth, gzDay string) + func IsLeapYear(year int) bool + func IsLunarZero(l *Lunar) bool + func JieQi(year, n int) int + func JieQiDay(year, month int) (firstDayName string, firstDay int, secondDayName string, secondDay int) + func JieQisOfMonth(year, m int) (first, second int) + func JieQisOfYear(year int) (list [12][2]int) + func LeapDays(year int) int + func LeapMonth(year int) int + func LunarDayString(day int) (s string) + func LunarMonthDays(year, month int) int + func LunarMonthString(month int, leap bool) string + func LunarMonths(year int) int + func LunarYearDays(year int) int + func LunarYearString(year int) string + func SolarMonthDays(year int, month int) int + func SplitDuration(second, nanosecond int) (days, hours, minutes, seconds, nsecs int) + func Zhi(x int) string + func ZhiHour(hour int) (zHour string) + type FestivalMap map[string]string + func NewFestivalMap() FestivalMap + func NewFestivalsFromFile(filename string) FestivalMap + func (fm FestivalMap) Add(key, val string) + func (fm FestivalMap) Del(key string) + func (fm FestivalMap) Get(key string) (string, error) + func (fm FestivalMap) SaveToFile(filename string) error + type Lunar struct + func NewLunar(year, month, day, hour, min, sec int, nsec int, leapFirst bool) *Lunar + func NewLunarNow() *Lunar + func NewLunarTime(t time.Time) *Lunar + func (l *Lunar) AnimalYear() string + func (l *Lunar) Convert() *Solar + func (l *Lunar) Day() int + func (l *Lunar) DayStr() string + func (l *Lunar) Equal(lunar *Lunar) bool + func (l *Lunar) Festival(fm FestivalMap) (string, error) + func (l *Lunar) GetTime() time.Time + func (l *Lunar) Hour() int + func (l *Lunar) IsLeapMonth() bool + func (l *Lunar) LeapMonth() int + func (l *Lunar) Minute() int + func (l *Lunar) Month() int + func (l *Lunar) MonthStr() string + func (l *Lunar) Nanosecond() int + func (l *Lunar) Second() int + func (l *Lunar) SetHour(hour int) *Lunar + func (l *Lunar) SetMinute(minute int) *Lunar + func (l *Lunar) SetNanosecond(nanosecond int) *Lunar + func (l *Lunar) SetSecond(second int) *Lunar + func (l *Lunar) String() string + func (l *Lunar) Weekday() time.Weekday + func (l *Lunar) WeekdayStr() string + func (l *Lunar) Year() int + func (l Lunar) Add(years, months, days, hours, mins, secs, nsecs int) *Lunar + func (l Lunar) Copy() *Lunar + func (l Lunar) MonthFirst() *Lunar + func (l Lunar) MonthLast() *Lunar + func (l Lunar) Truncate(d time.Duration) *Lunar + type Solar struct + func NewSolar(year, month, day, hour, min, sec int, nsec int, loc *time.Location) *Solar + func NewSolarNow() *Solar + func NewSolarTime(t time.Time) *Solar + func (s *Solar) Convert() *Lunar + func (s *Solar) DiffWithYMD(year, month, day int) int + func (s *Solar) Equal(solar *Solar) bool + func (s *Solar) Festival(fm FestivalMap) (string, error) + func (s *Solar) GanzhiYMD() (year, month, day string) + func (s *Solar) GetTime() time.Time + func (s *Solar) String() string + func (s Solar) AddMonth(months int) *Solar + func (s Solar) Truncate(d time.Duration) *Solar