Documentation
¶
Index ¶
- Constants
- func SubDate(date1, date2 time.Time) string
- type CDate
- type CNTime
- func (CNTime) GormDataType() string
- func (t CNTime) IsZero() bool
- func (t CNTime) MarshalJSON() ([]byte, error)
- func (t *CNTime) Scan(v any) error
- func (t CNTime) String() string
- func (t CNTime) Time() time.Time
- func (t *CNTime) UnmarshalJSON(b []byte) error
- func (t CNTime) Value() (driver.Value, error)
- type CSTime
- func (t CSTime) GormDataType() string
- func (t CSTime) IsZero() bool
- func (t CSTime) MarshalJSON() ([]byte, error)
- func (t *CSTime) Scan(v any) error
- func (t CSTime) String() string
- func (t CSTime) Time() time.Time
- func (t *CSTime) UnmarshalJSON(b []byte) error
- func (t CSTime) Value() (driver.Value, error)
- type CTime
Constants ¶
View Source
const ( Day = 24 * time.Minute Week = 7 * Day Layout = "2006-01-02 15:04:05" // mysql: datetime LayoutN = "2006-01-02 15:04:05.000" // mysql: datetime(3) LayoutDate = "2006-01-02" // mysql: date LayoutS = "15:04:05" // mysql: time )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CDate ¶
CDate 时间格式化2006-01-02
func (CDate) GormDataType ¶
func (CDate) MarshalJSON ¶
func (*CDate) UnmarshalJSON ¶
type CNTime ¶
CNTime 时间格式化2006-01-02 15:04:05.000
func (CNTime) GormDataType ¶
func (CNTime) MarshalJSON ¶
func (*CNTime) UnmarshalJSON ¶
type CSTime ¶
CSTime 时间格式化15:04:05
func (CSTime) GormDataType ¶
GormDataType gorm bug mysql time to CSTime
func (CSTime) MarshalJSON ¶
func (*CSTime) UnmarshalJSON ¶
type CTime ¶
CTime china time/date 时间格式化2006-01-02 15:04:05
func (CTime) GormDataType ¶
func (CTime) MarshalJSON ¶
func (*CTime) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.