Versions in this module Expand all Collapse all v1 v1.0.4 Apr 29, 2022 Changes in this version + const DateFormat + const DatetimeFormat + const TimeFormat + const YearFormat + const ZeroDate + const ZeroDatetime + const ZeroTime + const ZeroYear + var ErrDateParse = errors.New("Invalid Date string.") + var ErrDateRange = errors.New("Invalid Date range.") + var ErrDateScan = errors.New("Unable to convert value to a Date.") + var ErrDatetimeParse = errors.New("Invalid Datetime string.") + var ErrDatetimeRange = errors.New("Invalid Datetime range.") + var ErrDatetimeScan = errors.New("Unable to convert value to a Datetime.") + var ErrTimeParse = errors.New("Invalid Time string.") + var ErrTimeRange = errors.New("Invalid Time range.") + var ErrTimeScan = errors.New("Unable to convert value to a Time.") + var ErrYearParse = errors.New("Invalid Year string.") + var ErrYearRange = errors.New("Invalid Year range.") + var ErrYearScan = errors.New("Unable to convert value to a Year.") + type Date time.Time + func NewDate(year int, month time.Month, day int) (d Date, err error) + func ParseDate(value string) (d Date, err error) + func (d *Date) Scan(src interface{}) (err error) + func (d Date) After(u Date) bool + func (d Date) Before(u Date) bool + func (d Date) Date() (int, time.Month, int) + func (d Date) Day() int + func (d Date) Equal(u Date) bool + func (d Date) IsZero() bool + func (d Date) Local() time.Time + func (d Date) Month() time.Month + func (d Date) String() string + func (d Date) Time(loc *time.Location) (t time.Time) + func (d Date) Value() (driver.Value, error) + func (d Date) Weekday() time.Weekday + func (d Date) Year() int + func (d Date) YearDay() int + type Datetime time.Time + func NewDatetime(year int, month time.Month, day int, hour int, min int, sec int) (t Datetime, err error) + func ParseDatetime(value string) (t Datetime, err error) + func TimeToDatetime(t time.Time) Datetime + func (t *Datetime) Scan(src interface{}) (err error) + func (t Datetime) After(u Datetime) bool + func (t Datetime) Before(u Datetime) bool + func (t Datetime) Clock() (int, int, int) + func (t Datetime) Date() (int, time.Month, int) + func (t Datetime) Day() int + func (t Datetime) Equal(u Datetime) bool + func (t Datetime) Hour() int + func (t Datetime) IsZero() bool + func (t Datetime) Local() time.Time + func (t Datetime) Minute() int + func (t Datetime) Month() time.Month + func (t Datetime) Second() int + func (t Datetime) String() string + func (t Datetime) Time(loc *time.Location) (tt time.Time) + func (t Datetime) Value() (driver.Value, error) + func (t Datetime) Weekday() time.Weekday + func (t Datetime) Year() int + func (t Datetime) YearDay() int + type Time time.Duration + func DurationToTime(d time.Duration) (t Time, err error) + func NewTime(hour int, min int, sec int) (t Time, err error) + func ParseTime(value string) (t Time, err error) + func (t *Time) Scan(src interface{}) (err error) + func (t Time) After(u Time) bool + func (t Time) Before(u Time) bool + func (t Time) Clock() (int, int, int) + func (t Time) Duration() time.Duration + func (t Time) Equal(u Time) bool + func (t Time) Hour() int + func (t Time) IsZero() bool + func (t Time) Local() time.Time + func (t Time) Minute() int + func (t Time) Second() int + func (t Time) String() string + func (t Time) Time(loc *time.Location) time.Time + func (t Time) Value() (driver.Value, error) + type Year int + func NewYear(year int) (y Year, err error) + func ParseYear(value string) (y Year, err error) + func (y *Year) Scan(src interface{}) (err error) + func (y Year) After(u Year) bool + func (y Year) Before(u Year) bool + func (y Year) Equal(u Year) bool + func (y Year) IsZero() bool + func (y Year) Local() time.Time + func (y Year) String() string + func (y Year) Time(loc *time.Location) (t time.Time) + func (y Year) Value() (driver.Value, error) + func (y Year) Year() int v1.0.0 Sep 12, 2019