Documentation ¶
Index ¶
- Constants
- func CompareDate(date1, date2 time.Time) int
- func DayAddOrSub(t time.Time, num int64) time.Time
- func FormatToString(t time.Time, s string) string
- func GetWeekDay(t time.Time) int
- func HourAddOrSub(t time.Time, num int64) time.Time
- func InterpretStringToTimestamp(timeStr string, strFormat string) (int64, error)
- func IsZero(t time.Time) bool
- func MinuteAddOrSub(t time.Time, num int64) time.Time
- func Now() time.Time
- func StrToDate(timeStr string, s string) (time.Time, error)
- func UnixToTime(unix int64) time.Time
- type Date
Constants ¶
View Source
const ( DateTimeStr = "YYYY-MM-DD hh:mm:ss" DateStr = "YYYY-MM-DD" )
Variables ¶
This section is empty.
Functions ¶
func CompareDate ¶
func FormatToString ¶
FormatToString 时间格式化成字符串 Time forms a string
func InterpretStringToTimestamp ¶
InterpretStringToTimestamp String to timestamp 字符串转时间戳
func UnixToTime ¶
UnixToTime 时间戳转时间 UnixToTime timestamp to time
Types ¶
Click to show internal directories.
Click to hide internal directories.