date

package
v1.0.32 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Day = time.Hour * time.Duration(24)

Variables

This section is empty.

Functions

This section is empty.

Types

type Date

type Date struct {
	time.Time
}

func FromTime

func FromTime(t time.Time) Date

func New

func New(year, month, day int) Date

func Today

func Today() Date

func (Date) After added in v1.0.19

func (dt Date) After(other Date) bool

func (Date) Before added in v1.0.19

func (dt Date) Before(other Date) bool

func (Date) Compare added in v1.0.19

func (dt Date) Compare(other Date) int

func (Date) Equal added in v1.0.19

func (dt Date) Equal(other Date) bool

func (Date) MarshalJSON added in v1.0.23

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

func (Date) Next

func (dt Date) Next(days int) Date

func (Date) Prev

func (dt Date) Prev(days int) Date

func (*Date) Scan added in v1.0.21

func (dt *Date) Scan(src any) error

func (Date) String

func (dt Date) String() string

func (Date) Sub added in v1.0.19

func (dt Date) Sub(other Date) time.Duration

func (*Date) UnmarshalBind

func (dt *Date) UnmarshalBind(value string) error

func (*Date) UnmarshalJSON added in v1.0.23

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

func (Date) Value

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

Jump to

Keyboard shortcuts

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