Versions in this module Expand all Collapse all v1 v1.0.2 Nov 20, 2023 v1.0.1 Nov 20, 2023 Changes in this version + const DateFormat + const DateFormatNum + const DateHFormatNum + const DateHMFormatNum + const DateTimeFormat + const DateTimeFormatMicro + const DateTimeFormatMilli + const DateTimeFormatNano + const DateTimeFormatNum + const HFormatNum + const HMFormatNum + const TimeFormat + const TimeFormatNum + const YFormatNum + const YMFormatNum + func DateTimeToTs(dt string) int64 + func GetBeijingTime(layout, value string) (t time.Time, err error) + func GetDayBeginMoment(t time.Time) time.Time + func GetDayBeginMomentTs(ts int64) time.Time + func GetDayElapsedMs(t time.Time) int64 + func GetDayElapsedNs(t time.Time) int64 + func GetDayElapsedS(t time.Time) int64 + func GetDayElapsedUs(t time.Time) int64 + func GetDayEndMoment(t time.Time) time.Time + func GetDayEndMomentTs(uts int64) time.Time + func GetDaysBtwTs(ts0, ts1 int64) int64 + func GetFriDate(t time.Time) string + func GetHoursBtwTs(ts0, ts1 int64) int64 + func GetMinutesBtwTs(ts0, ts1 int64) int64 + func GetMonDate(t time.Time) string + func GetNowDate() string + func GetNowDateTime() string + func GetNowDateTimeZ() string + func GetNowMs() int64 + func GetNowNs() int64 + func GetNowS() int64 + func GetNowTime() string + func GetNowUs() int64 + func GetSatDate(t time.Time) string + func GetSunDate(t time.Time) string + func GetThursDate(t time.Time) string + func GetTuesDate(t time.Time) string + func GetWedDate(t time.Time) string + func GetWeekday(t time.Time, w time.Weekday) time.Time + func IsLeapYear(year int) bool + func IsSameDay(ts1, ts2 int64) bool + func IsSameHour(ts1, ts2 int64) bool + func IsSameMinute(ts1, ts2 int64) bool + func IsSameMonth(ts1, ts2 int64) bool + func IsSameWeek(ts1, ts2 int64) bool + func IsSameYear(ts1, ts2 int64) bool + func TimeCost() func() time.Duration + func TsToDateTime(ts int64) string + type TimeCounter struct + func NewTimeCounter() (t *TimeCounter) + func (t *TimeCounter) GetD() time.Duration + func (t *TimeCounter) GetMs() int64 + func (t *TimeCounter) GetNs() int64 + func (t *TimeCounter) GetS() int64 + func (t *TimeCounter) GetUs() int64 + func (t *TimeCounter) Reset()