class

Cronic::SpanDefinitions

Inherits Cronic::Handlers < Reference < Object

SpanDefinitions subclasses return an Array of NamedTuples containing a match sequence and a Proc that calls a token handler (see handler.cr)

Constructors

new(now : Time)
Source

Instance methods

anchor1

Shortcut for shared anchor #1

Source
anchor2

Shortcut for shared anchor #2

Source
anchor3

Shortcut for shared anchor #3

Source
maybe(item)

Shortcut for single-term Or with maybe

Source
maybetime

Shortcut for a time and day-portion TODO: Actually should be: ormaybe(RepeaterTime, seq(RepeaterTime, RepeaterDayPortion)), but this is not supported by our matching engine.

Source
now=(now : Time)
Source
or(item, item2)

Shortcut for double-term Or

Source
ormaybe(item, item2)

Shortcut for double-term Or with maybe

Source
slashdash

Shortcut for common date separators

Source