Documentation
¶
Index ¶
- Constants
- func Date() string
- func Format(str interface{}, layout string) string
- func FormatTimeStruct(str interface{}, layout string) (time.Time, error)
- func FormatTimeStructLocation(str interface{}, layout string) (time.Time, error)
- func GetDaysInYear(t string) int
- func GetDaysInYearByThisYear() int
- func ISOWeekStart(t time.Time) time.Time
- func Now() string
- func NowHourMinSec() (hour, min, sec int)
- func NowYearMonthDay() (year int, month time.Month, day int)
- func Time() string
- func TimeFormatByYmdHms(year int, month time.Month, day, hour, min, sec int) time.Time
- func UnixTime() int64
- func UnixTimeFormat(i int64, str string) string
- func UnixTimeFormatDateTime(i int64) string
- func Weekday() string
- func YearMonth() string
- type DateTime
Constants ¶
View Source
const ( Y_M = "2006-01" Y_M_D = "2006-01-02" Y_M_D_2 = "2006年01月02日" Y_M_D_H_I_S = "2006-01-02 15:04:05" Y_M_D_H_I_S_CST = "2006-01-02 15:04:05 +0800 CST" //2016-12-04 15:39:06 +0800 CST Y_M_D_H_I_S_RFC3339 = "2006-01-02T15:04:05Z07:00" Y_M_D_H_I_S_2 = "2006年01月02日 15:04:05" H_I_S = "15:04:05" )
Variables ¶
This section is empty.
Functions ¶
func FormatTimeStructLocation ¶
格式
func TimeFormatByYmdHms ¶
时间格式化
func UnixTimeFormat ¶
func UnixTimeFormatDateTime ¶
Types ¶
type DateTime ¶
func (DateTime) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.