Documentation ¶
Index ¶
- Constants
- func FormatISO8601Date(timestampSecond int64) string
- func GetCurrentDate() string
- func GetCurrentMilliUnix() int64
- func GetCurrentNanoUnix() int64
- func GetCurrentUnix() int64
- func GetCurrentWjDate() string
- func NowUTCNanoSeconds() int64
- func NowUTCSeconds() int64
- type Pro
- func (p Pro) AfterDay(day int) Pro
- func (p Pro) AfterHour(hour int) Pro
- func (p Pro) AfterSeconds(seconds int) Pro
- func (p Pro) BeforeDay(day int) Pro
- func (p Pro) BeforeHour(hour int) Pro
- func (p Pro) BeforeSeconds(seconds int) Pro
- func (p Pro) DiffInHour(t2 time.Time) (hour int64)
- func (p Pro) DiffInHourWithAbs(t2 time.Time) (hour int64)
- func (p Pro) DiffInMinutes(t2 time.Time) (hour int64)
- func (p Pro) DiffInMinutesWithAbs(t2 time.Time) (hour int64)
- func (p Pro) DiffInSecond(t2 time.Time) (hour int64)
- func (p Pro) DiffInSecondWithAbs(t2 time.Time) (hour int64)
- func (p Pro) EndOfDay() Pro
- func (p Pro) Format() string
- func (p Pro) Nanosecond() int
- func (p Pro) Now() time.Time
- func (p Pro) SetFormat(layout string) string
- func (p Pro) StartOfDay() Pro
- func (p Pro) Timestamp() int64
- func (p Pro) TimestampWithMillisecond() int64
- func (p Pro) Unix() int64
- func (p Pro) UnixNano() int64
Constants ¶
View Source
const ( RFC822Format = "Mon, 02 Jan 2006 15:04:05 MST" ISO8601Format = "2006-01-02T15:04:05Z" )
Variables ¶
This section is empty.
Functions ¶
func FormatISO8601Date ¶
func NowUTCNanoSeconds ¶
func NowUTCNanoSeconds() int64
func NowUTCSeconds ¶
func NowUTCSeconds() int64
Types ¶
type Pro ¶
Pro 结构体
func SetCurrentUnix ¶ added in v1.0.30
SetCurrentUnix 设置当前的时间 Unix时间戳
func (Pro) DiffInHourWithAbs ¶
DiffInHourWithAbs 相差多少小时(绝对值)
func (Pro) DiffInMinutes ¶
DiffInMinutes 相差多少分钟
func (Pro) DiffInMinutesWithAbs ¶
DiffInMinutesWithAbs 相差多少分钟(绝对值)
func (Pro) DiffInSecondWithAbs ¶
DiffInSecondWithAbs 相差多少秒(绝对值)
func (Pro) TimestampWithMillisecond ¶
TimestampWithMillisecond 毫秒级时间戳
Click to show internal directories.
Click to hide internal directories.