Documentation
¶
Index ¶
- func CreateTime(millis int64) time.Time
- func GetDateString(t time.Time) string
- func GetDay(t time.Time) int
- func GetHour(t time.Time) int
- func GetHumanReadableDuration(start time.Time, end time.Time) string
- func GetLongDateString(t time.Time) string
- func GetLongHumanReadableDuration(start time.Time, end time.Time) string
- func GetLongLongDateString(t time.Time) string
- func GetMillionSecond(t time.Time) int
- func GetMinute(t time.Time) int
- func GetMonth(t time.Time) int
- func GetNanosecond(t time.Time) int64
- func GetSecond(t time.Time) int
- func GetShortDateString(t time.Time) string
- func GetTimestamp(t time.Time) int64
- func GetYear(t time.Time) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTime ¶
CreateTime returns the local Time corresponding to the given Unix time, sec seconds and nsec nanoseconds since January 1, 1970 UTC. It is valid to pass nsec outside the range [0, 999999999]. Not all sec values have a corresponding time value. One such value is 1<<63-1 (the largest int64 value).
func GetDateString ¶
GetDateString gets short date format like '2018-11-11'.
func GetHumanReadableDuration ¶
GetHumanReadableDuration gets a duration between times and returns format like '01:12:31' (?hour:?minute:?second).
func GetLongDateString ¶
GetLongDateString gets date format like '2018-11-11 12:12:12'.
func GetLongHumanReadableDuration ¶
GetLongHumanReadableDuration gets a duration between times and returns format like '1d 3h 12m 11s' (?day ?hour ?minute ?second).
func GetLongLongDateString ¶
GetLongLongDateString gets short date format like '2018-11-11 12:12:12,233'.
func GetMillionSecond ¶
GetMillionSecond gets millionSecond number.
func GetNanosecond ¶
GetNanosecond gets current timestamp in Nanosecond.
func GetShortDateString ¶
GetShortDateString gets time format like '12:12:12'.
func GetTimestamp ¶
GetTimestamp gets current timestamp in milliseconds.
Types ¶
This section is empty.