date

package
v4.1.11 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: Apache-2.0 Imports: 2 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 civil.Date

func DateOf

func DateOf(t time.Time) Date

func Parse

func Parse(layout string, value string) (Date, error)

func ParseDate

func ParseDate(s string) (Date, error)

func (Date) AddDays

func (d Date) AddDays(n int) Date

func (Date) After

func (d Date) After(d2 Date) bool

func (Date) Before

func (d Date) Before(d2 Date) bool

func (Date) Date

func (d Date) Date() (year int, month time.Month, day int)

func (Date) DaysSince

func (d Date) DaysSince(s Date) int

func (Date) Format

func (d Date) Format(layout string) string

func (Date) In

func (d Date) In(loc *time.Location) time.Time

func (Date) IsValid

func (d Date) IsValid() bool

func (Date) MarshalText

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

func (Date) String

func (d Date) String() string

func (*Date) UnmarshalText

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

type NullDate

type NullDate struct {
	Date  Date
	Valid bool
}

func MakeNullDate

func MakeNullDate(d *Date) NullDate

Jump to

Keyboard shortcuts

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