Documentation
¶
Overview ¶
Package interval provides half-open time interval algebra: the foundation for merging free/busy data across many calendars.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set []Span
Set is a normalized sequence of spans: sorted by start, non-empty, non-overlapping, non-adjacent. Construct with Normalize or the Set methods; all methods preserve the invariant.
func (Set) Complement ¶
Complement returns the gaps of s within the window.
func (Set) ContainsSpan ¶
ContainsSpan reports whether t lies entirely within a single span of s.
func (Set) Shrink ¶
Shrink trims each span by before on the left and after on the right, dropping spans that become empty. The inverse of padding: shrinking a free set by travel time yields the times at which a padded event still fits.
type Span ¶
Span is a half-open interval [Start, End). A Span with End <= Start is considered empty.