Documentation ¶
Index ¶
- type Interval
- func (i Interval) Contiguous(input Interval) bool
- func (i Interval) Duration() time.Duration
- func (i Interval) Engulf(input Interval) bool
- func (i Interval) Equal(input Interval) bool
- func (i Interval) Include(input time.Time) bool
- func (i Interval) Overlap(input Interval) bool
- func (i Interval) String() string
- func (i Interval) Sub(input Interval) Intervals
- type Intervals
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interval ¶
Interval defines a period that is constained by two time boundaries, a start time that is part of the interval and an end time which is excluded from the interval.
|----------i----------[ start end
func NewInterval ¶
func (Interval) Contiguous ¶
Contiguous tests if input is contiguous to Interval.
interval: |----------i----------[ input: |--input--[ input: |--input--[
func (Interval) Engulf ¶
Engulf tests that the input interval is within Interval. Returns true also if both intervals are equal.
interval: |------------i------------[ input: |---input---[
func (Interval) Equal ¶
Equal tests that the input interval has the time time boundaries as Interval.
interval: |------------i------------[ input: |----------input----------[
func (Interval) Include ¶
Include tests if input time is within the interval. Note that if input is
equal to the end of the interval, then false is returned.
interval: |------------i------------[ input: |
Click to show internal directories.
Click to hide internal directories.