xtime

package
v1.23.9 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DateFormatTimestamp = "2006-01-02 15:04:05.000000"
	DateFormatLine      = "2006/01/02 15:04:05"
	DateYmdFormatLine   = "2006/01/02"
	DateFormatLineV2    = "2006-01-02 15:04:05"
	DateFormatLineV3    = "2006-01-02"
	DateYmdNoLine       = "20060102"
	DateymdNoLine       = "060102"
	DateYmdNoLineV2     = "20060102150405"
	DateYmdNoLineV3     = "200601"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Date added in v1.23.1

type Date time.Time

func (Date) GormDataType added in v1.23.3

func (t Date) GormDataType() string

func (Date) MarshalJSON added in v1.23.1

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

func (Date) Ptr added in v1.23.1

func (t Date) Ptr() *Date

func (*Date) Scan added in v1.23.1

func (t *Date) Scan(value interface{}) error

Scan 实现 sql.Scanner 接口,处理从数据库里拿出的值

func (Date) String added in v1.23.1

func (t Date) String() string

func (Date) Time added in v1.23.1

func (t Date) Time() time.Time

Time get time.

func (*Date) UnmarshalJSON added in v1.23.1

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

func (Date) Value added in v1.23.1

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

Value 实现 driver.Valuer 接口,处理将要写入数据库的值

type Time

type Time time.Time

func (Time) GormDataType added in v1.23.3

func (t Time) GormDataType() string

func (Time) MarshalJSON

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

func (Time) Ptr added in v1.21.10

func (t Time) Ptr() *Time

func (*Time) Scan

func (t *Time) Scan(value interface{}) error

Scan 实现 sql.Scanner 接口,处理从数据库里拿出的值

func (Time) String

func (t Time) String() string

func (Time) Time

func (t Time) Time() time.Time

Time get time.

func (*Time) UnmarshalJSON

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

func (Time) Value

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

Value 实现 driver.Valuer 接口,处理将要写入数据库的值

Jump to

Keyboard shortcuts

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