Documentation ¶
Index ¶
- Constants
- Variables
- func DaysCountOfMonth(year, month int) int
- func FormatTime(t time.Time) string
- func IsLeapYear(year int) bool
- func MustParseDateTime(s string) time.Time
- func MustParseMomentDate(tm time.Time, s string) time.Time
- func MustParseMomentTime(tm time.Time, s string) time.Time
- func MustParseTime(s string) time.Time
- func ParseDateParts(s string, seg []int) error
- func ParseDateTime(s string) (time.Time, error)
- func ParseMomentDate(tm time.Time, dateText string) (time.Time, error)
- func ParseMomentTime(tm time.Time, timeText string) (time.Time, error)
- func ParseTimeParts(s string, seg []int) error
- type Clock
Constants ¶
View Source
const ( DateFormat = "2006-01-02 15:04:05" TimestampFormat = "2006-01-02 15:04:05.999" )
View Source
const (
DefaultTickInterval = 250 * time.Millisecond // 1秒tick4次
)
Variables ¶
View Source
var ( DummyTime time.Time DateFormatSep = "-" TimeFormatSep = ":" DateTimeSep = " " )
Functions ¶
func FormatTime ¶
func MustParseDateTime ¶
func ParseMomentDate ¶
根据当前时间和字符串日期,生成一个新的time.Time对象
func ParseMomentTime ¶
根据当前时间和字符串日期,生成一个新的time.Time对象
Types ¶
Click to show internal directories.
Click to hide internal directories.