Versions in this module Expand all Collapse all v1 v1.2.1 Jan 23, 2026 v1.2.0 Jan 23, 2026 Changes in this version + func DaysSince(d Date) int v1.1.1 Jan 23, 2026 Changes in this version type Date + func (d Date) AddMonths(months int) Date + func (d Date) AddYears(years int) Date v1.1.0 Jan 23, 2026 Changes in this version + func MonthsSince(d Date) int + func YearsSince(d Date) int type Date + func (d Date) AddDays(duration Duration) Date + func (d Date) SubDays(u Date) Duration + func (d Date) SubMonths(u Date) int + func (d Date) SubYears(u Date) int type Duration + func Since(d Date) Duration v1.0.0 Jan 20, 2026 Changes in this version + type Date struct + Day int + Month time.Month + Year int + func FromTime(t time.Time) Date + func MustParse(str string) Date + func New(year int, month time.Month, day int) Date + func Parse(str string) (Date, error) + func Today() Date + func (d *Date) Scan(src any) error + func (d *Date) UnmarshalJSON(data []byte) error + func (d Date) Add(duration Duration) Date + func (d Date) EndOfDay() time.Time + func (d Date) EndOfDayUTC() time.Time + func (d Date) Equal(u Date) bool + func (d Date) IsZero() bool + func (d Date) MarshalJSON() ([]byte, error) + func (d Date) Noon() time.Time + func (d Date) NoonUTC() time.Time + func (d Date) StartOfDay() time.Time + func (d Date) StartOfDayUTC() time.Time + func (d Date) String() string + func (d Date) Sub(duration Duration) Date + func (d Date) TimeAt(hour, min, sec, nsec int) time.Time + func (d Date) TimeAtUTC(hour, min, sec, nsec int) time.Time + func (d Date) Value() (driver.Value, error) + type Duration int + const Day + const LeapYear + const Week + const WorkWeek + const Year