Documentation ¶
Index ¶
- Constants
- func DateToTime(format, date string) (time.Time, error)
- func FormatRFC3339(t time.Time) string
- func ThisMonth(t time.Time) time.Time
- func ThisYear(t time.Time) time.Time
- func Time9999() time.Time
- func TimestampToDate(u int64, format string) string
- func TimestampToTime(u int64) time.Time
- func ToDay(t time.Time) time.Time
- func ToHour(t time.Time) time.Time
- func ToMinute(t time.Time) time.Time
- func Today() time.Time
Constants ¶
View Source
const ( RFC3339 = time.RFC3339 // 例子:2022-08-03T16:40:58+08:00 YmdHmsTZ = "2006-01-02T15:04:05-0700" // 例子:2022-08-03T16:40:58+0800 YmdHms = "2006-01-02 15:04:05" YmdHm = "2006-01-02 15:04" YmdH = "2006-01-02 15" Ymd = "2006-01-02" Ym = "2006-01" Y = "2006" YSecond = "20060102150405" YMinute = "200601021504" YHour = "2006010215" YDay = "20060102" YMonth = "200601" MDay = "0102" YmdHmsMillisecond = "2006-01-02 15:04:05.999" YmdHmsMicrosecond = "2006-01-02 15:04:05.999999" YmdHmsNanosecond = "2006-01-02 15:04:05.999999999" YMillisecond = "20060102150405.999" YMicrosecond = "20060102150405.999999" YNanosecond = "20060102150405.999999999" YmdHmsMLogger = "2006-01-02T15:04:05.999" )
Date Format
Variables ¶
This section is empty.
Functions ¶
func TimestampToDate ¶
TimestampToDate timestamp to date
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.