Documentation ¶
Overview ¶
time的扩展包。
Index ¶
- Variables
- func After10Y() time.Time
- func After1H() time.Time
- func After1W() time.Time
- func After1Y() time.Time
- func DurationH(h int64) time.Duration
- func DurationM(m int64) time.Duration
- func DurationMS(ms int64) time.Duration
- func DurationS(s int64) time.Duration
- func FromEpoch(sec int64) time.Time
- func GetISO8601TimeStamp(ts time.Time) string
- func MustParse(s string) time.Time
- func NowEpoch() int64
- func NowEpochMS() int64
- func NowSecT() time.Time
- func TimeStrToRFC1123(str string) string
- func TimeToUTCStr(t time.Time) string
- func TimestampToHourStr(ts int) string
- func ToEpoch(t time.Time) int64
- func ToEpochMS(t time.Time) int64
- func TryParse(s string) (time.Time, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrParse = errors.New("Parse time error")
)
Functions ¶
func DurationMS ¶
func GetISO8601TimeStamp ¶
func NowEpochMS ¶
func NowEpochMS() int64
func TimeStrToRFC1123 ¶
returns a formatted string of `time.RFC1123` format.
func TimestampToHourStr ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.