Documentation
¶
Index ¶
- Constants
- type Time
- func (*Time) DateTimeToUnix(t string) (int64, error)
- func (obj *Time) GetDateByStr(str, local string) time.Time
- func (obj *Time) GetDateTimeByStr(str, local string) time.Time
- func (*Time) GetLocal(local string) *time.Location
- func (*Time) GetStrDate() string
- func (*Time) GetStrDateTime() string
- func (*Time) GetStrTime() string
- func (obj *Time) GetTimeByStr(str, local string) time.Time
- func (*Time) MilliSecondToDateTime(t int64) string
- func (*Time) RunTime(callback func()) time.Duration
- func (*Time) SleepRange(max, min int)
- func (*Time) UnixToDateTime(t int64) string
Constants ¶
View Source
const ( LayoutDate = "2006-01-02" LayoutTime = "15:04:05" LayoutDateTime = "2006-01-02 15:04:05" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Time ¶
type Time struct {
}
func (*Time) DateTimeToUnix ¶
DateTimeToUnix 日期字符串转时间戳
func (*Time) GetDateByStr ¶ added in v1.0.1
func (*Time) GetDateTimeByStr ¶ added in v1.0.1
func (*Time) GetStrDateTime ¶ added in v1.0.1
GetStrDateTime 返回年月日时分秒
func (*Time) GetTimeByStr ¶ added in v1.0.1
func (*Time) MilliSecondToDateTime ¶
MilliSecondToDateTime 毫秒转日期
Click to show internal directories.
Click to hide internal directories.