date

package
v0.1258.0-MLPAB1886con... Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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 FromTime

func FromTime(t time.Time) Date

func New

func New(year, month, day string) Date

func Today

func Today() Date

func (Date) AddDate

func (d Date) AddDate(years, months, days int) Date

func (Date) After

func (d Date) After(other Date) bool

func (Date) Before

func (d Date) Before(other Date) bool

func (Date) Day

func (d Date) Day() int

func (Date) DayString added in v0.671.0

func (d Date) DayString() string

func (Date) Equals

func (d Date) Equals(other Date) bool

func (Date) Format

func (d Date) Format(format string) string

func (Date) Hash added in v0.910.0

func (d Date) Hash() (uint64, error)

func (Date) IsZero

func (d Date) IsZero() bool

func (Date) MarshalDynamoDBAttributeValue

func (d Date) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)

func (Date) MarshalText

func (d Date) MarshalText() ([]byte, error)

func (Date) Month

func (d Date) Month() time.Month

func (Date) MonthString added in v0.671.0

func (d Date) MonthString() string

func (Date) String

func (d Date) String() string

func (Date) Time

func (d Date) Time() time.Time

func (*Date) UnmarshalDynamoDBAttributeValue

func (d *Date) UnmarshalDynamoDBAttributeValue(av types.AttributeValue) error

func (*Date) UnmarshalText

func (d *Date) UnmarshalText(text []byte) error

func (Date) Valid

func (d Date) Valid() bool

func (Date) Year

func (d Date) Year() int

func (Date) YearString added in v0.671.0

func (d Date) YearString() string

type FormatError

type FormatError string

func (FormatError) Error

func (e FormatError) Error() string

type TimeOrDate added in v0.842.0

type TimeOrDate interface {
	IsZero() bool
	Format(string) string
	Day() int
	Month() time.Month
	Year() int
}

Jump to

Keyboard shortcuts

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