Versions in this module Expand all Collapse all v1 v1.20240411.1 Apr 11, 2024 v1.20240312.1 Mar 9, 2024 Changes in this version type Date + func (d Date) Date() (int, time.Month, int) + func (d Date) YearDay() int v1.20240228.1 Feb 29, 2024 Changes in this version type ConvertConfig + Hour int + Minute int + Nanosecond int + Second int type ConvertOption + func OptConvertHour(hour int) ConvertOption + func OptConvertMinute(minute int) ConvertOption + func OptConvertNanosecond(nanosecond int) ConvertOption + func OptConvertSecond(second int) ConvertOption type Date + func (d *Date) UnmarshalText(data []byte) error + func (d Date) Compare(other Date) int + func (d Date) GoString() string + func (d Date) ISOWeek() (year, week int) + func (d Date) MarshalText() ([]byte, error) + func (d Date) MonthStart() Date + func (d Date) Weekday() time.Weekday v1.20240205.1 Feb 5, 2024 Changes in this version + func NullTimeFromPtr(d *Date, opts ...ConvertOption) sql.NullTime + type ConvertConfig struct + Timezone *time.Location + type ConvertOption func(*ConvertConfig) + func OptConvertTimezone(tz *time.Location) ConvertOption + type Date struct + Day int + Month time.Month + Year int + func FromString(s string) (Date, error) + func FromTime(t time.Time) (Date, error) + func InTimezone(t time.Time, tz *time.Location) Date + func NewDate(year int, month time.Month, day int) Date + func Today(opts ...TodayOption) Date + func (d *Date) Scan(src any) error + func (d *Date) String() string + func (d *Date) UnmarshalJSON(data []byte) error + func (d Date) AddDays(days int) Date + func (d Date) AddMonths(months int) Date + func (d Date) AddMonthsStdlib(months int) Date + func (d Date) AddYears(years int) Date + func (d Date) AddYearsStdlib(years int) Date + func (d Date) After(other Date) bool + func (d Date) Before(other Date) bool + func (d Date) Equal(other Date) bool + func (d Date) Format(layout string) string + func (d Date) IsZero() bool + func (d Date) MarshalJSON() ([]byte, error) + func (d Date) MonthEnd() Date + func (d Date) Sub(other Date) int64 + func (d Date) SubErr(other Date) (int64, error) + func (d Date) ToTime(opts ...ConvertOption) time.Time + func (d Date) Value() (driver.Value, error) + type NullDate struct + Date Date + Valid bool + func NullDateFromPtr(d *Date) NullDate + func (nd *NullDate) Scan(value any) error + func (nd NullDate) Value() (driver.Value, error) + type TodayConfig struct + NowProvider func() time.Time + Timezone *time.Location + type TodayOption func(*TodayConfig) + func OptTodayNow(now time.Time) TodayOption + func OptTodayTimezone(tz *time.Location) TodayOption