times

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalDate

type LocalDate time.Time

LocalDate 2006-01-02

func (LocalDate) Local

func (t LocalDate) Local() time.Time

func (LocalDate) MarshalJSON

func (t LocalDate) MarshalJSON() ([]byte, error)

func (*LocalDate) Scan

func (t *LocalDate) Scan(v any) error

Scan 读取数据库时会调用 valueof time.Time 注意是指针类型 method

func (LocalDate) String

func (t LocalDate) String() string

func (*LocalDate) UnmarshalJSON

func (t *LocalDate) UnmarshalJSON(data []byte) error

func (LocalDate) Value

func (t LocalDate) Value() (driver.Value, error)

Value 写入数据库时会调用

type LocalTime

type LocalTime time.Time

LocalTime 2006-01-02 15:04:05

func (LocalTime) Local

func (t LocalTime) Local() time.Time

func (LocalTime) MarshalJSON

func (t LocalTime) MarshalJSON() ([]byte, error)

func (*LocalTime) Scan

func (t *LocalTime) Scan(v any) error

Scan 读取数据库时会调用 valueof time.Time 注意是指针类型 method

func (LocalTime) String

func (t LocalTime) String() string

func (*LocalTime) UnmarshalJSON

func (t *LocalTime) UnmarshalJSON(data []byte) error

func (LocalTime) Value

func (t LocalTime) Value() (driver.Value, error)

Value 写入数据库时会调用

type PlainDate

type PlainDate struct {
	Time  time.Time
	Valid bool
}

PlainDate 20060102

func (PlainDate) Local

func (t PlainDate) Local() time.Time

func (PlainDate) MarshalJSON

func (t PlainDate) MarshalJSON() ([]byte, error)

func (*PlainDate) Scan

func (t *PlainDate) Scan(value any) error

Scan 读取数据库时会调用 valueof time.Time 注意是指针类型 method

func (PlainDate) String

func (t PlainDate) String() string

func (*PlainDate) UnmarshalJSON

func (t *PlainDate) UnmarshalJSON(data []byte) error

func (PlainDate) Value

func (t PlainDate) Value() (driver.Value, error)

Value 写入数据库时会调用

type PlainTime

type PlainTime struct {
	Time        time.Time
	Millisecond int //毫秒
	Valid       bool
}

PlainTime 20060102150405999 2006/01/02 15:04:05.999

func (PlainTime) Local

func (t PlainTime) Local() time.Time

func (PlainTime) MarshalJSON

func (t PlainTime) MarshalJSON() ([]byte, error)

func (*PlainTime) Scan

func (t *PlainTime) Scan(value any) error

Scan 读取数据库时会调用 valueof time.Time 注意是指针类型 method

func (PlainTime) String

func (t PlainTime) String() string

func (*PlainTime) UnmarshalJSON

func (t *PlainTime) UnmarshalJSON(data []byte) error

func (PlainTime) Value

func (t PlainTime) Value() (driver.Value, error)

Value 写入数据库时会调用

type PrettyDate

type PrettyDate time.Time

PrettyDate 2006/01/02

func (PrettyDate) Local

func (t PrettyDate) Local() time.Time

func (PrettyDate) MarshalJSON

func (t PrettyDate) MarshalJSON() ([]byte, error)

func (*PrettyDate) Scan

func (t *PrettyDate) Scan(v any) error

Scan 读取数据库时会调用 valueof time.Time 注意是指针类型 method

func (PrettyDate) String

func (t PrettyDate) String() string

func (*PrettyDate) UnmarshalJSON

func (t *PrettyDate) UnmarshalJSON(data []byte) error

func (PrettyDate) Value

func (t PrettyDate) Value() (driver.Value, error)

Value 写入数据库时会调用

type PrettyTime

type PrettyTime time.Time

PrettyTime 2006/01/02 15:04:05

func (PrettyTime) Local

func (t PrettyTime) Local() time.Time

func (PrettyTime) MarshalJSON

func (t PrettyTime) MarshalJSON() ([]byte, error)

func (*PrettyTime) Scan

func (t *PrettyTime) Scan(v any) error

Scan 读取数据库时会调用 valueof time.Time 注意是指针类型 method

func (PrettyTime) String

func (t PrettyTime) String() string

func (*PrettyTime) UnmarshalJSON

func (t *PrettyTime) UnmarshalJSON(data []byte) error

func (PrettyTime) Value

func (t PrettyTime) Value() (driver.Value, error)

Value 写入数据库时会调用

type Timestamp

type Timestamp struct {
	Time  time.Time
	Valid bool
}

Timestamp Unix时间戳

func (Timestamp) Local

func (t Timestamp) Local() time.Time

func (Timestamp) MarshalJSON

func (t Timestamp) MarshalJSON() ([]byte, error)

func (*Timestamp) Scan

func (t *Timestamp) Scan(value any) error

Scan 读取数据库时会调用 valueof time.Time 注意是指针类型 method

func (Timestamp) String

func (t Timestamp) String() string

func (*Timestamp) UnmarshalJSON

func (t *Timestamp) UnmarshalJSON(data []byte) error

func (Timestamp) Value

func (t Timestamp) Value() (driver.Value, error)

Value 写入数据库时会调用

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL