Documentation
¶
Index ¶
- Constants
- func MakeTimeSeries(start, stop time.Time, interval time.Duration) []time.Time
- type Date
- func (d Date) AddDays(n int) Date
- func (d Date) After(d2 Date) bool
- func (d Date) Before(d2 Date) bool
- func (d Date) Compare(d2 Date) int
- func (d Date) DateValue() (pgtype.Date, error)
- func (d Date) DaysSince(s Date) (days int)
- func (d Date) In(loc *time.Location) time.Time
- func (d Date) IsZero() bool
- func (d Date) MarshalText() ([]byte, error)
- func (d *Date) ScanDate(v pgtype.Date) error
- func (d Date) String() string
- func (d *Date) UnmarshalText(data []byte) error
- func (d Date) Weekday() time.Weekday
- type DateRange
- func (d DateRange) BoundTypes() (lower, upper pgtype.BoundType)
- func (d DateRange) Bounds() (lower, upper any)
- func (d DateRange) IsNull() bool
- func (d *DateRange) ScanBounds() (lowerTarget, upperTarget any)
- func (d *DateRange) ScanNull() error
- func (d *DateRange) SetBoundTypes(lower, upper pgtype.BoundType) error
- type DaysOfWeek
- type NullDateRange
- func (nd NullDateRange) BoundTypes() (lower, upper pgtype.BoundType)
- func (nd NullDateRange) Bounds() (lower, upper any)
- func (nd NullDateRange) IsNull() bool
- func (nd *NullDateRange) ScanBounds() (lowerTarget, upperTarget any)
- func (nd *NullDateRange) ScanNull() error
- func (nd *NullDateRange) SetBoundTypes(lower, upper pgtype.BoundType) error
- type NullDaysOfWeek
- type Time
- func (t Time) After(t2 Time) bool
- func (t Time) Before(t2 Time) bool
- func (t Time) Compare(t2 Time) int
- func (t Time) IsZero() bool
- func (t Time) MarshalText() ([]byte, error)
- func (t *Time) ScanTime(v pgtype.Time) error
- func (t Time) String() string
- func (t Time) TimeValue() (pgtype.Time, error)
- func (t *Time) UnmarshalText(data []byte) error
Constants ¶
View Source
const (
Day time.Duration = 24 * time.Hour
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Date ¶
func MakeDateSeries ¶
func NewDateFromTime ¶
func (Date) MarshalText ¶
func (*Date) UnmarshalText ¶
type DaysOfWeek ¶
type DaysOfWeek struct {
Mo, Tu, We, Th, Fr, Sa, Su bool
}
func ParseDaysOfWeek ¶
func ParseDaysOfWeek(s []bool) (*DaysOfWeek, error)
func (DaysOfWeek) Compare ¶
func (w DaysOfWeek) Compare(w2 DaysOfWeek) int
func (DaysOfWeek) DaysOfWeek ¶
func (w DaysOfWeek) DaysOfWeek() []bool
type NullDateRange ¶
func (NullDateRange) BoundTypes ¶
func (nd NullDateRange) BoundTypes() (lower, upper pgtype.BoundType)
func (NullDateRange) Bounds ¶
func (nd NullDateRange) Bounds() (lower, upper any)
func (NullDateRange) IsNull ¶
func (nd NullDateRange) IsNull() bool
func (*NullDateRange) ScanBounds ¶
func (nd *NullDateRange) ScanBounds() (lowerTarget, upperTarget any)
func (*NullDateRange) ScanNull ¶
func (nd *NullDateRange) ScanNull() error
func (*NullDateRange) SetBoundTypes ¶
func (nd *NullDateRange) SetBoundTypes(lower, upper pgtype.BoundType) error
type NullDaysOfWeek ¶
type NullDaysOfWeek struct {
DaysOfWeek DaysOfWeek
Valid bool
}
Click to show internal directories.
Click to hide internal directories.