Documentation ¶
Index ¶
- Constants
- type Date
- type Datetime
- func (d *Datetime) CostMonth() string
- func (d *Datetime) GormDataType() string
- func (d *Datetime) MarshalJSON() ([]byte, error)
- func (d *Datetime) Scan(value interface{}) error
- func (d *Datetime) ToDate() *Date
- func (d *Datetime) ToTime() *time.Time
- func (d *Datetime) UnmarshalJSON(b []byte) error
- func (d Datetime) Value() (driver.Value, error)
- type UintSlice
Constants ¶
View Source
const DateFormat = "2006-01-02"
View Source
const DateTimeFormat = "2006-01-02 15:04:05"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Date ¶
func NewDateByLayout ¶
NewDateByLayout 构建 Date by layout Author SliverHorn
func (Date) GormDataType ¶
GormDataType gorm 定义数据库字段类型 Author SliverHorn
func (*Date) MarshalJSON ¶
MarshalJSON 序列化 Author SliverHorn
func (*Date) ToDatetime ¶
ToDatetime Date to Datetime Author SliverHorn
func (*Date) UnmarshalJSON ¶
UnmarshalJSON 反序列化 Author SliverHorn
type Datetime ¶
func NewDatetime ¶
NewDatetime 构建 Datetime 方法 Author SliverHorn
func NewDatetimeByLayout ¶
NewDatetimeByLayout 构建 Datetime by layout Author SliverHorn
func (*Datetime) GormDataType ¶
GormDataType gorm 定义数据库字段类型 Author SliverHorn
func (*Datetime) MarshalJSON ¶
MarshalJSON 序列化 Author SliverHorn
func (*Datetime) UnmarshalJSON ¶
UnmarshalJSON 反序列化 Author SliverHorn
Click to show internal directories.
Click to hide internal directories.