Documentation ¶ Index ¶ func Date(year int, month time.Month, day int) time.Time func EndOf(d time.Time, p Period) time.Time func Series(t0, t1 time.Time, p Period) []time.Time func StartOf(d time.Time, p Period) time.Time type Period func (p Period) String() string Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Date ¶ func Date(year int, month time.Month, day int) time.Time Date creates a new date. func EndOf ¶ func EndOf(d time.Time, p Period) time.Time EndOf returns the last date in the given period that contains the receiver. func Series ¶ func Series(t0, t1 time.Time, p Period) []time.Time Series returns a series of dates in the given interval, which contains both t0 and t1. func StartOf ¶ func StartOf(d time.Time, p Period) time.Time StartOf returns the first date in the given period which contains the receiver. Types ¶ type Period ¶ type Period int Period is a time interval. const ( // Daily is a daily interval. Daily Period = iota // Weekly is a weekly interval. Weekly // Monthly is a monthly interval. Monthly // Quarterly is a quarterly interval. Quarterly // Yearly is a yearly interval. Yearly ) func (Period) String ¶ func (p Period) String() string Source Files ¶ View all Source files date.go Click to show internal directories. Click to hide internal directories.