Documentation ¶ Index ¶ Constants func Check(year, month, day int) bool func First(t time.Time) int64 func Format(t time.Time, layouts ...string) string func FormatLayout(layout string) string func IsLeapYear(year int) bool func Last(t time.Time) int64 func Parse(t string, layouts ...string) (time.Time, error) Constants ¶ View Source const ( FormatDate = "ymd" FormatDateBar = "y-m-d" FormatTime = "y-m-d h:i:s" FormatTimeJoin = "ymdhis" ) 格式化占位符 Variables ¶ This section is empty. Functions ¶ func Check ¶ added in v0.0.5 func Check(year, month, day int) bool Check 校验日期有效性 func First ¶ func First(t time.Time) int64 First ... func Format ¶ func Format(t time.Time, layouts ...string) string Format ... func FormatLayout ¶ added in v0.0.6 func FormatLayout(layout string) string FormatLayout ... func IsLeapYear ¶ added in v0.0.5 func IsLeapYear(year int) bool IsLeapYear 是否是闰年 func Last ¶ func Last(t time.Time) int64 Last ... func Parse ¶ func Parse(t string, layouts ...string) (time.Time, error) Parse ... Types ¶ This section is empty. Source Files ¶ View all Source files const.go util.go Click to show internal directories. Click to hide internal directories.