Documentation ¶
Index ¶
- Constants
- Variables
- func BeginThisMonth() time.Time
- func BeginThisWeek() time.Time
- func BeginThisYear() time.Time
- func CurrentCompress() string
- func CurrentHour() time.Time
- func CurrentMinute() time.Time
- func CurrentSecond() time.Time
- func EndThisMonth() time.Time
- func EndThisWeek() time.Time
- func EndThisYear() time.Time
- func Parse(str string) (t time.Time, err error)
- func String(time DateTime) string
- func Today() time.Time
- func TodayEndMoment() time.Time
- type DateTime
Constants ¶
View Source
const ( DefaultFormat = "2006-01-02 15:04:05" CompressFormat = "20060102150405" )
Variables ¶
View Source
var ( /** 设置每周的起始时间 */ WeekStartDay = time.Sunday )
Functions ¶
Types ¶
type DateTime ¶
DateTime 结构体
func (*DateTime) CurrentDefault ¶
获取当前时间字符串 - yyyy-MM-dd HH:mm:ss
func (*DateTime) CurrentTime ¶
func (DateTime) MarshalJSON ¶
func (DateTime) MarshalJSONSecond ¶
Click to show internal directories.
Click to hide internal directories.