Documentation
¶
Index ¶
- Constants
- Variables
- func AtToday(timestamp int64) bool
- func CFormat(layout string) string
- func Format(timestamp int64, layout string) string
- func IsFormattedDate(date, format string) bool
- func ParseT(dt, layout string, compatible ...bool) *time.Time
- func Time(timestamp int64) time.Time
- func Week(timestamp int64, weekMap map[string]string) string
- func Zero(timestamp ...int64) int64
- type T
Constants ¶
View Source
const ( YMD = "2006-01-02" //2006-01-02 Layout = time.Layout //01/02 03:04:05PM '06 -0700 The reference time, in numerical order. ANSIC = time.ANSIC //Mon Jan _2 15:04:05 2006 UnixDate = time.UnixDate //Mon Jan _2 15:04:05 MST 2006 RubyDate = time.RubyDate //Mon Jan 02 15:04:05 -0700 2006 RFC822 = time.RFC822 //02 Jan 06 15:04 MST RFC822Z = time.RFC822Z //02 Jan 06 15:04 -0700 RFC822 with numeric zone RFC850 = time.RFC850 //Monday, 02-Jan-06 15:04:05 MST RFC1123 = time.RFC1123 //Mon, 02 Jan 2006 15:04:05 MST RFC1123Z = time.RFC1123Z //Mon, 02 Jan 2006 15:04:05 -0700 RFC1123 with numeric zone RFC3339 = time.RFC3339 //2006-01-02T15:04:05Z07:00 RFC3339Nano = time.RFC3339Nano //2006-01-02T15:04:05.999999999Z07:00 Kitchen = time.Kitchen //3:04PM Stamp = time.Stamp //Jan _2 15:04:05 StampMilli = time.StampMilli //Jan _2 15:04:05.000 StampMicro = time.StampMicro //Jan _2 15:04:05.000000 StampNano = time.StampNano //Jan _2 15:04:05.000000000 )
Variables ¶
View Source
var WeekXingQi = map[string]string{
"Monday": "星期一",
"Tuesday": "星期二",
"Wednesday": "星期三",
"Thursday": "星期四",
"Friday": "星期五",
"Saturday": "星期六",
"Sunday": "星期日",
}
View Source
var WeekZhou = map[string]string{
"Monday": "周一",
"Tuesday": "周二",
"Wednesday": "周三",
"Thursday": "周四",
"Friday": "周五",
"Saturday": "周六",
"Sunday": "周日",
}
Functions ¶
func IsFormattedDate ¶
IsFormattedDate Determine the date is input format
Types ¶
Click to show internal directories.
Click to hide internal directories.