Documentation
¶
Index ¶
- func Date() string
- func DateTime() string
- func EndTime(t time.Time) time.Time
- func FormatDate(t time.Time) string
- func FormatDateTime(t time.Time) string
- func FormatUnix(t int64, layout string) string
- func Interval(now time.Time, start, end string) bool
- func IsRFC3339(str string) bool
- func IsTime(str string, format string) bool
- func IsZeroTime(t time.Time) bool
- func MustParseDate(t string) time.Time
- func MustParseDateTime(t string) time.Time
- func MustParseDateTimeInLayout(tstr, layout string) time.Time
- func ParseDate(tstr string) (time.Time, error)
- func ParseDateTime(tstr string) (time.Time, error)
- func ParseDateTimeInLayout(tstr, layout string) (time.Time, error)
- func StartTime(t time.Time) time.Time
- func ToUnix(tstr string) int64
- func Zero() time.Time
- type Time
- type TimeRange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDate ¶
func FormatDateTime ¶
func FormatUnix ¶
func IsZeroTime ¶ added in v1.0.5
IsZeroTime 判断时间是否为零值 比较常见的零值时间为: 0000-00-00 00:00:00 0000-00-01 00:00:00 0001-01-01 00:00:00 1000-01-01 00:00:00 1970-01-01 00:00:00
func MustParseDate ¶ added in v1.0.5
func MustParseDateTime ¶ added in v1.0.5
func MustParseDateTimeInLayout ¶ added in v1.0.5
func ParseDateTimeInLayout ¶ added in v1.0.5
自定义格式解析时间
Types ¶
type Time ¶ added in v1.0.5
func (Time) MarshalJSON ¶ added in v1.0.5
func (*Time) UnmarshalJSON ¶ added in v1.0.5
Click to show internal directories.
Click to hide internal directories.