Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseCompatibility ¶
Types ¶
type AtModifiers ¶
type EvalOptions ¶
type Expression ¶
type Expression struct { Start *TimeAnchor `parser:" @@"` End *TimeAnchor `parser:"(',' @@)?"` Modifiers *Modifiers `parser:"(':' @@)?"` AtModifiers *AtModifiers `parser:"('@' @@)?"` // contains filtered or unexported fields }
func Parse ¶
func Parse(from string, parseOpts ParseOptions) (*Expression, error)
func (*Expression) Eval ¶
func (e *Expression) Eval(evalOpts EvalOptions) (time.Time, time.Time, error)
type ParseOptions ¶
ParseOptions allows for additional options that could probably not be added to the time range itself
type TimeAnchor ¶
type TimeAnchor struct { Grain *Grain `parser:"( @@"` AbsDate *string `parser:"| @AbsoluteDate"` AbsTime *string `parser:"| @AbsoluteTime"` Earliest bool `parser:"| @Earliest"` Now bool `parser:"| @Now"` Latest bool `parser:"| @Latest"` Watermark bool `parser:"| @Watermark)"` Offset *Grain `parser:"@@?"` Trunc *string `parser:" ('/' @Grain)?"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.