Documentation ¶
Index ¶
- func Since(dt DateTime) time.Duration
- type DateTime
- func (receiver DateTime) AddDate(years int, months int, days int) DateTime
- func (receiver DateTime) AddDays(days int) DateTime
- func (receiver DateTime) AddHours(hours int) DateTime
- func (receiver DateTime) AddMillisecond(millisecond int) DateTime
- func (receiver DateTime) AddMinutes(minutes int) DateTime
- func (receiver DateTime) AddMonths(months int) DateTime
- func (receiver DateTime) AddSeconds(seconds int) DateTime
- func (receiver DateTime) AddTime(hours int, minutes int, seconds int) DateTime
- func (receiver DateTime) AddYears(year int) DateTime
- func (receiver DateTime) After(dt DateTime) bool
- func (receiver DateTime) Before(dt DateTime) bool
- func (receiver DateTime) Date() DateTime
- func (receiver DateTime) Day() int
- func (receiver DateTime) Duration() time.Duration
- func (receiver DateTime) Hour() int
- func (receiver DateTime) MarshalJSON() ([]byte, error)
- func (receiver DateTime) Minute() int
- func (receiver DateTime) Month() int
- func (receiver DateTime) ResetDay() DateTime
- func (receiver *DateTime) Scan(val any) error
- func (receiver DateTime) Second() int
- func (receiver DateTime) Sub(dt DateTime) time.Duration
- func (receiver DateTime) ToString(format string) string
- func (receiver DateTime) ToTime() time.Time
- func (receiver DateTime) UnixMicro() int64
- func (receiver DateTime) UnixMilli() int64
- func (receiver DateTime) UnixNano() int64
- func (receiver *DateTime) UnmarshalJSON(b []byte) error
- func (receiver DateTime) Value() (driver.Value, error)
- func (receiver DateTime) Year() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DateTime ¶
type DateTime struct {
// contains filtered or unexported fields
}
func (DateTime) AddMillisecond ¶ added in v0.10.0
AddMillisecond 添加毫秒
func (DateTime) AddMinutes ¶
AddMinutes 添加分钟
func (DateTime) AddSeconds ¶
AddSeconds 添加秒
func (DateTime) MarshalJSON ¶ added in v0.8.0
MarshalJSON to output non base64 encoded []byte 此处不能用指针,否则json序列化时不执行
func (*DateTime) Scan ¶ added in v0.10.0
Scan scan value into Jsonb, implements sql.Scanner interface
func (*DateTime) UnmarshalJSON ¶ added in v0.8.0
UnmarshalJSON to deserialize []byte
Click to show internal directories.
Click to hide internal directories.