Documentation ¶
Index ¶
- func CreateTime(millis int64) time.Time
- func GetCNDateString(t time.Time) string
- func GetCNDuration(start, end time.Time) string
- func GetCNWeekDay(t time.Time) string
- func GetDateString(t time.Time) string
- func GetDay(t time.Time) int
- func GetDuration(start, end time.Time) string
- func GetHour(t time.Time) int
- func GetLongCNDateString(t time.Time) string
- func GetLongDateString(t time.Time) string
- func GetLongFullDateString(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 GetShortCNDateString(t time.Time) string
- func GetShortDateString(t time.Time) string
- func GetTimestamp(t time.Time) int64
- func GetWeekDay(t time.Time) string
- func GetYear(t time.Time) int
- func ParseDate(timeString string) (time.Time, error)
- func ParseTime(timeString string) (time.Time, error)
- func ParseTimeFromRFC3339(timeString string) (time.Time, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTime ¶
CreateTime creates a time from a millis second.
func GetCNDateString ¶ added in v1.0.7
GetCNDateString gets short date format like '2018年11月11日'.
func GetCNDuration ¶ added in v1.0.7
func GetDateString ¶
GetDateString gets short date format like '2018-11-11'.
func GetDuration ¶ added in v1.0.7
func GetLongCNDateString ¶ added in v1.0.7
GetLongCNDateString gets date format like '2018年11月11日 12时12分12秒'.
func GetLongDateString ¶
GetLongDateString gets date format like '2018-11-11 12:12:12'.
func GetLongFullDateString ¶ added in v1.0.7
GetLongFullDateString 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 GetShortCNDateString ¶ added in v1.0.7
GetShortCNDateString gets time format like '12时12分12秒'.
func GetShortDateString ¶
GetShortDateString gets time format like '12:12:12'.
func GetTimestamp ¶
GetTimestamp gets current timestamp in milliseconds.
Types ¶
This section is empty.