Documentation
¶
Index ¶
- type Date
- func (s Date) AddDate(years int, months int, days int) Date
- func (s Date) Day() int
- func (s Date) Format(layout string) string
- func (s Date) In(loc *time.Location) Date
- func (s Date) Location() *time.Location
- func (s Date) MarshalText() ([]byte, error)
- func (s Date) Month() time.Month
- func (s *Date) Scan(value interface{}) error
- func (s Date) String() string
- func (s *Date) StringToTypeS2m(b []byte) error
- func (s Date) Sub(u Date) time.Duration
- func (s Date) Time() time.Time
- func (s *Date) TypeToStringS2m() ([]byte, error)
- func (s Date) Unix() int64
- func (s Date) UnixMilli() int64
- func (s *Date) UnmarshalText(b []byte) error
- func (s Date) Value() (driver.Value, error)
- func (s Date) Year() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Date ¶
type Date struct {
// contains filtered or unexported fields
}
日期格式
func (Date) MarshalText ¶
MarshalText json编码 MarshalText 与 MarshalJson 得区别:如果返回值是一个Json字符串使用MarshalJson,如果返回值不是一个Json字符串使用 MarshalText
func (*Date) StringToTypeS2m ¶
StringToTypeS2m 这个要实现指针方法不然无法赋值
func (*Date) TypeToStringS2m ¶
TypeToStringS2m 指针非指针方法都行
func (*Date) UnmarshalText ¶
UnmarshalText json解码 这里的s必须是指针
Click to show internal directories.
Click to hide internal directories.