Documentation ¶
Index ¶
- type Comparable
- type Day
- func (d Day) AddDays(ds int) Day
- func (d Day) AddHours(h int) Hour
- func (d Day) AddMicro(m int) Micro
- func (d Day) AddMillis(m int) Milli
- func (d Day) AddMinutes(m int) Minute
- func (d Day) AddMonths(m int) Day
- func (d Day) AddN(n int) Day
- func (d Day) AddNano(n int) TimeExact
- func (d Day) AddSeconds(s int) Second
- func (d Day) AddYears(y int) Day
- func (d Day) After(t Span) bool
- func (d Day) AsDay() Day
- func (d Day) AsHour() Hour
- func (d Day) AsMicro() Micro
- func (d Day) AsMilli() Milli
- func (d Day) AsMinute() Minute
- func (d Day) AsMonth() Month
- func (d Day) AsSecond() Second
- func (d Day) AsTime() time.Time
- func (d Day) AsTimeExact() TimeExact
- func (d Day) AsYear() Year
- func (d Day) Before(t Span) bool
- func (d Day) Contains(t Span) bool
- func (d Day) Decrement(t dura.Time) TimeExact
- func (d Day) Duration() dura.Time
- func (d Day) End() TimeExact
- func (d Day) Increment(t dura.Time) TimeExact
- func (d *Day) Scan(value interface{}) error
- func (d Day) Start() TimeExact
- func (d Day) Value() (driver.Value, error)
- type Filter
- type FilterFunc
- type Hour
- func (h Hour) AddDays(d int) Hour
- func (h Hour) AddHours(hs int) Hour
- func (h Hour) AddMicro(m int) Micro
- func (h Hour) AddMillis(m int) Milli
- func (h Hour) AddMinutes(m int) Minute
- func (h Hour) AddMonths(m int) Hour
- func (h Hour) AddN(n int) Hour
- func (h Hour) AddNano(n int) TimeExact
- func (h Hour) AddSeconds(s int) Second
- func (h Hour) AddYears(y int) Hour
- func (h Hour) After(t Span) bool
- func (h Hour) AsDay() Day
- func (h Hour) AsHour() Hour
- func (h Hour) AsMicro() Micro
- func (h Hour) AsMilli() Milli
- func (h Hour) AsMinute() Minute
- func (h Hour) AsMonth() Month
- func (h Hour) AsSecond() Second
- func (h Hour) AsTime() time.Time
- func (h Hour) AsTimeExact() TimeExact
- func (h Hour) AsYear() Year
- func (h Hour) Before(t Span) bool
- func (h Hour) Contains(t Span) bool
- func (h Hour) Decrement(l dura.Time) TimeExact
- func (h Hour) Duration() dura.Time
- func (h Hour) End() TimeExact
- func (h Hour) Increment(l dura.Time) TimeExact
- func (h *Hour) Scan(value interface{}) error
- func (h Hour) Start() TimeExact
- func (h Hour) Value() (driver.Value, error)
- type Incrementable
- type Micro
- func (m Micro) AddDays(d int) Micro
- func (m Micro) AddHours(h int) Micro
- func (m Micro) AddMicro(ms int) Micro
- func (m Micro) AddMillis(ms int) Micro
- func (m Micro) AddMinutes(ms int) Micro
- func (m Micro) AddMonths(ms int) Micro
- func (m Micro) AddN(n int) Micro
- func (m Micro) AddNano(n int) TimeExact
- func (m Micro) AddSeconds(s int) Micro
- func (m Micro) AddYears(y int) Micro
- func (m Micro) After(t Span) bool
- func (m Micro) AsDay() Day
- func (m Micro) AsHour() Hour
- func (m Micro) AsMicro() Micro
- func (m Micro) AsMilli() Milli
- func (m Micro) AsMinute() Minute
- func (m Micro) AsMonth() Month
- func (m Micro) AsSecond() Second
- func (m Micro) AsTime() time.Time
- func (m Micro) AsTimeExact() TimeExact
- func (m Micro) AsYear() Year
- func (m Micro) Before(t Span) bool
- func (m Micro) Contains(t Span) bool
- func (m Micro) Decrement(l dura.Time) TimeExact
- func (m Micro) Duration() dura.Time
- func (m Micro) End() TimeExact
- func (m Micro) Increment(l dura.Time) TimeExact
- func (m *Micro) Scan(value interface{}) error
- func (m Micro) Start() TimeExact
- func (m Micro) Value() (driver.Value, error)
- type Milli
- func (m Milli) AddDays(d int) Milli
- func (m Milli) AddHours(h int) Milli
- func (m Milli) AddMicro(ms int) Micro
- func (m Milli) AddMillis(ms int) Milli
- func (m Milli) AddMinutes(ms int) Milli
- func (m Milli) AddMonths(ms int) Milli
- func (m Milli) AddN(n int) Milli
- func (m Milli) AddNano(n int) TimeExact
- func (m Milli) AddSeconds(s int) Milli
- func (m Milli) AddYears(y int) Milli
- func (m Milli) After(t Span) bool
- func (m Milli) AsDay() Day
- func (m Milli) AsHour() Hour
- func (m Milli) AsMicro() Micro
- func (m Milli) AsMilli() Milli
- func (m Milli) AsMinute() Minute
- func (m Milli) AsMonth() Month
- func (m Milli) AsSecond() Second
- func (m Milli) AsTime() time.Time
- func (m Milli) AsTimeExact() TimeExact
- func (m Milli) AsYear() Year
- func (m Milli) Before(t Span) bool
- func (m Milli) Contains(t Span) bool
- func (m Milli) Decrement(l dura.Time) TimeExact
- func (m Milli) Duration() dura.Time
- func (m Milli) End() TimeExact
- func (m Milli) Increment(l dura.Time) TimeExact
- func (m *Milli) Scan(value interface{}) error
- func (m Milli) Start() TimeExact
- func (m Milli) Value() (driver.Value, error)
- type Minute
- func (m Minute) AddDays(d int) Minute
- func (m Minute) AddHours(h int) Minute
- func (m Minute) AddMicro(ms int) Micro
- func (m Minute) AddMillis(ms int) Milli
- func (m Minute) AddMinutes(ms int) Minute
- func (m Minute) AddMonths(ms int) Minute
- func (m Minute) AddN(n int) Minute
- func (m Minute) AddNano(n int) TimeExact
- func (m Minute) AddSeconds(s int) Second
- func (m Minute) AddYears(y int) Minute
- func (m Minute) After(t Span) bool
- func (m Minute) AsDay() Day
- func (m Minute) AsHour() Hour
- func (m Minute) AsMicro() Micro
- func (m Minute) AsMilli() Milli
- func (m Minute) AsMinute() Minute
- func (m Minute) AsMonth() Month
- func (m Minute) AsSecond() Second
- func (m Minute) AsTime() time.Time
- func (m Minute) AsTimeExact() TimeExact
- func (m Minute) AsYear() Year
- func (m Minute) Before(t Span) bool
- func (m Minute) Contains(t Span) bool
- func (m Minute) Decrement(l dura.Time) TimeExact
- func (m Minute) Duration() dura.Time
- func (m Minute) End() TimeExact
- func (m Minute) Increment(l dura.Time) TimeExact
- func (m *Minute) Scan(value interface{}) error
- func (m Minute) Start() TimeExact
- func (m Minute) Value() (driver.Value, error)
- type Month
- func (m Month) AddDays(d int) Day
- func (m Month) AddHours(h int) Hour
- func (m Month) AddMicro(mi int) Micro
- func (m Month) AddMillis(mi int) Milli
- func (m Month) AddMinutes(mi int) Minute
- func (m Month) AddMonths(ms int) Month
- func (m Month) AddN(n int) Month
- func (m Month) AddNano(n int) TimeExact
- func (m Month) AddSeconds(s int) Second
- func (m Month) AddYears(y int) Month
- func (m Month) After(t Span) bool
- func (m Month) AsDay() Day
- func (m Month) AsHour() Hour
- func (m Month) AsMicro() Micro
- func (m Month) AsMilli() Milli
- func (m Month) AsMinute() Minute
- func (m Month) AsMonth() Month
- func (m Month) AsSecond() Second
- func (m Month) AsTime() time.Time
- func (m Month) AsTimeExact() TimeExact
- func (m Month) AsYear() Year
- func (m Month) Before(t Span) bool
- func (m Month) Contains(t Span) bool
- func (m Month) Decrement(l dura.Time) TimeExact
- func (m Month) Duration() dura.Time
- func (m Month) End() TimeExact
- func (m Month) Increment(l dura.Time) TimeExact
- func (m *Month) Scan(value interface{}) error
- func (m Month) Start() TimeExact
- func (m Month) Value() (driver.Value, error)
- type Schedule
- type Second
- func (s Second) AddDays(d int) Second
- func (s Second) AddHours(h int) Second
- func (s Second) AddMicro(m int) Micro
- func (s Second) AddMillis(m int) Milli
- func (s Second) AddMinutes(m int) Second
- func (s Second) AddMonths(m int) Second
- func (s Second) AddN(n int) Second
- func (s Second) AddNano(n int) TimeExact
- func (s Second) AddSeconds(secs int) Second
- func (s Second) AddYears(y int) Second
- func (s Second) After(t Span) bool
- func (s Second) AsDay() Day
- func (s Second) AsHour() Hour
- func (s Second) AsMicro() Micro
- func (s Second) AsMilli() Milli
- func (s Second) AsMinute() Minute
- func (s Second) AsMonth() Month
- func (s Second) AsSecond() Second
- func (s Second) AsTime() time.Time
- func (s Second) AsTimeExact() TimeExact
- func (s Second) AsYear() Year
- func (s Second) Before(t Span) bool
- func (s Second) Contains(t Span) bool
- func (s Second) Decrement(l dura.Time) TimeExact
- func (s Second) Duration() dura.Time
- func (s Second) End() TimeExact
- func (s Second) Increment(l dura.Time) TimeExact
- func (s *Second) Scan(value interface{}) error
- func (s Second) Start() TimeExact
- func (s Second) Value() (driver.Value, error)
- type SeqOption
- type Sequence
- type Span
- type Time
- type TimeExact
- func (t TimeExact) AddDays(d int) TimeExact
- func (t TimeExact) AddHours(h int) TimeExact
- func (t TimeExact) AddMicro(m int) TimeExact
- func (t TimeExact) AddMillis(m int) TimeExact
- func (t TimeExact) AddMinutes(m int) TimeExact
- func (t TimeExact) AddMonths(m int) TimeExact
- func (t TimeExact) AddN(n int) TimeExact
- func (t TimeExact) AddNano(n int) TimeExact
- func (t TimeExact) AddSeconds(s int) TimeExact
- func (t TimeExact) AddYears(y int) TimeExact
- func (t TimeExact) After(s Span) bool
- func (t TimeExact) AsDay() Day
- func (t TimeExact) AsHour() Hour
- func (t TimeExact) AsMicro() Micro
- func (t TimeExact) AsMilli() Milli
- func (t TimeExact) AsMinute() Minute
- func (t TimeExact) AsMonth() Month
- func (t TimeExact) AsSecond() Second
- func (t TimeExact) AsTime() time.Time
- func (t TimeExact) AsTimeExact() TimeExact
- func (t TimeExact) AsYear() Year
- func (t TimeExact) Before(s Span) bool
- func (t TimeExact) Contains(s Span) bool
- func (t TimeExact) Decrement(d dura.Time) TimeExact
- func (t TimeExact) Duration() dura.Time
- func (t TimeExact) End() TimeExact
- func (t TimeExact) Increment(d dura.Time) TimeExact
- func (t *TimeExact) Scan(value interface{}) error
- func (t TimeExact) Start() TimeExact
- func (t TimeExact) Value() (driver.Value, error)
- type TimeSpan
- type Year
- func (y Year) AddDays(d int) Day
- func (y Year) AddHours(h int) Hour
- func (y Year) AddMicro(m int) Micro
- func (y Year) AddMillis(m int) Milli
- func (y Year) AddMinutes(m int) Minute
- func (y Year) AddMonths(m int) Month
- func (y Year) AddN(n int) Year
- func (y Year) AddNano(n int) TimeExact
- func (y Year) AddSeconds(s int) Second
- func (y Year) AddYears(ys int) Year
- func (y Year) After(t Span) bool
- func (y Year) AsDay() Day
- func (y Year) AsHour() Hour
- func (y Year) AsMicro() Micro
- func (y Year) AsMilli() Milli
- func (y Year) AsMinute() Minute
- func (y Year) AsMonth() Month
- func (y Year) AsSecond() Second
- func (y Year) AsTime() time.Time
- func (y Year) AsTimeExact() TimeExact
- func (y Year) AsYear() Year
- func (y Year) Before(t Span) bool
- func (y Year) Contains(t Span) bool
- func (y Year) Decrement(i dura.Time) TimeExact
- func (y Year) Duration() dura.Time
- func (y Year) End() TimeExact
- func (y Year) Increment(i dura.Time) TimeExact
- func (y *Year) Scan(value interface{}) error
- func (y Year) Start() TimeExact
- func (y Year) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comparable ¶
type Day ¶
func (Day) AddMinutes ¶
func (Day) AddSeconds ¶
func (Day) AsTimeExact ¶
type Incrementable ¶
type Minute ¶
func ThisMinute ¶
func ThisMinute() Minute
func (Minute) AddMinutes ¶
func (Minute) AddSeconds ¶
func (Minute) AsTimeExact ¶
type Second ¶
func ThisSecond ¶
func ThisSecond() Second
func (Second) AddMinutes ¶
func (Second) AddSeconds ¶
func (Second) AsTimeExact ¶
type Sequence ¶
type Sequence struct {
// contains filtered or unexported fields
}
func NewSequence ¶
type Span ¶
type Span interface { Start() TimeExact End() TimeExact Duration() dura.Time Comparable }
type Time ¶
type Time interface { // Implementations of Time have methods that transfer the data to // structs with different precision. For example: 2017-01-05 12:45:06 // is a has second precision, if this data were represented as a chron.Second // sec.AsDay() would truncate the time to 2017-01-05 00:00:00. AsYear() Year AsMonth() Month AsDay() Day AsHour() Hour AsMinute() Minute AsSecond() Second AsMilli() Milli AsMicro() Micro AsTimeExact() TimeExact AsTime() time.Time Incrementable }
Time implementations are instants in time that are transferable to other instants with a different precision--year, month, day, hour, minute, second, milli, micro, nano (which is called TimeExact). Implementations are also transferable to an underlying time.Time via AsTime().
type TimeExact ¶
func (TimeExact) AddMinutes ¶
func (TimeExact) AddSeconds ¶
func (TimeExact) AsTimeExact ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.