Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Infinite = Timeframe{}
A timeframe with no bounds, representing all time
View Source
var ZeroRange = Range{}
Functions ¶
This section is empty.
Types ¶
type Option ¶
func WithTimeframe ¶ added in v1.3.0
type Timeframe ¶ added in v1.3.0
A timeframe
func (Timeframe) CompareDuration ¶ added in v1.3.0
CompareDuration compares the duration between t.Since and t.Until with the given duration
func (Timeframe) Contains ¶ added in v1.3.0
Determine if the timeframe contains the specified time. Timeframes are inclusive on the lower bound and exclusive on the upper bound.
func (Timeframe) Duration ¶ added in v1.3.0
What is the duration of the timeframe. If a timeframe is not bounded on both ends, the duration is infinite, which is expressed as a negative value. If Until is before Since, the value will also be negative, this is a logically invalid state that is interpreted as the timeframe being unbounded.
Click to show internal directories.
Click to hide internal directories.