Documentation ¶
Index ¶
- Variables
- type Festival
- type Gregorian
- type LuckyHour
- type SolarTerm
- type VLunar
- func (v VLunar) Animal() string
- func (v VLunar) Date() (year, month, day int)
- func (v VLunar) DateTime() (year, month, day, hour, minute, second int)
- func (v VLunar) Day() int
- func (v VLunar) DayAnimal() string
- func (v VLunar) DayHeavenStem() string
- func (v VLunar) Festivals() (events []Festival)
- func (v VLunar) IsCatYear() bool
- func (v VLunar) IsDogYear() bool
- func (v VLunar) IsDragonYear() bool
- func (v VLunar) IsGoatYear() bool
- func (v VLunar) IsHorseYear() bool
- func (v VLunar) IsLeapMonth() bool
- func (v VLunar) IsLeapYear() bool
- func (v VLunar) IsMonkeyYear() bool
- func (v VLunar) IsOxYear() bool
- func (v VLunar) IsPigYear() bool
- func (v VLunar) IsRatYear() bool
- func (v VLunar) IsRoosterYear() bool
- func (v VLunar) IsSnakeYear() bool
- func (v VLunar) IsTigerYear() bool
- func (v VLunar) LeapMonth() int
- func (v VLunar) LuckyHour() string
- func (v VLunar) LuckyHours() (ret []LuckyHour)
- func (v VLunar) Month() int
- func (v VLunar) MonthAnimal() string
- func (v VLunar) MonthHeavenStem() string
- func (v VLunar) SolarTerm() SolarTerm
- func (v VLunar) String() string
- func (v VLunar) Time() (hour, minute, second int)
- func (v VLunar) ToDateString() string
- func (v VLunar) ToDayString() (day string)
- func (v VLunar) ToGregorian() (g Gregorian)
- func (v VLunar) ToMonthString() string
- func (v VLunar) ToYearString() string
- func (v VLunar) Year() int
- func (v VLunar) YearHeavenStem() string
Constants ¶
This section is empty.
Variables ¶
var (
PI = math.Pi
)
Functions ¶
This section is empty.
Types ¶
type Gregorian ¶
Gregorian defines a Gregorian struct.
func NewGregorian ¶
NewGregorian returns a new Gregorian instance. 初始化 Gregorian 结构体
type VLunar ¶
type VLunar struct { Error error // contains filtered or unexported fields }
VLunar defines a Lunar struct.
func (VLunar) DateTime ¶
DateTime gets lunar year, month, day, hour, minute, and second like 2020, 8, 5, 13, 14, 15.
func (VLunar) DayHeavenStem ¶
func (VLunar) IsDragonYear ¶
IsDragonYear reports whether is year of Dragon.
func (VLunar) IsGoatYear ¶
IsGoatYear reports whether is year of Goat.
func (VLunar) IsHorseYear ¶
IsHorseYear reports whether is year of Horse.
func (VLunar) IsLeapMonth ¶
IsLeapMonth reports whether is leap month.
func (VLunar) IsLeapYear ¶
IsLeapYear reports whether is leap year.
func (VLunar) IsMonkeyYear ¶
IsMonkeyYear reports whether is year of Monkey.
func (VLunar) IsRoosterYear ¶
IsRoosterYear reports whether is year of Rooster.
func (VLunar) IsSnakeYear ¶
IsSnakeYear reports whether is year of Snake.
func (VLunar) IsTigerYear ¶
IsTigerYear reports whether is year of Tiger.
func (VLunar) LuckyHours ¶
func (VLunar) MonthAnimal ¶
func (VLunar) MonthHeavenStem ¶
func (VLunar) String ¶
String outputs a string in YYYY-MM-DD HH::ii::ss format, implement Stringer interface.
func (VLunar) ToDateString ¶
ToDateString outputs a string in lunar date format like "Ngày 16 tháng 9 năm 2020".
func (VLunar) ToDayString ¶
ToDayString outputs a string in lunar day format like "Giáp Tý".
func (VLunar) ToGregorian ¶
ToLunar Convert Vietnamese lunar calendar into Gregorian calendar 将 农历 转化为 公历
func (VLunar) ToMonthString ¶
ToMonthString outputs a string in lunar month format like "Giáp Tý".
func (VLunar) ToYearString ¶
ToYearString outputs a string in lunar year format like "Giáp Tý".