module Cronic::Handlers

Direct including types

Defined in:

cronic/handlers.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.dealias_and_disambiguate_times(tokens, ambiguous_time_range : Int32 | Nil = 6, **options) #

[View source]

Instance Method Detail

def day_or_time(day_start : Time, time_tokens, context : PointerDir = PointerDir::Future, **options) : Timespan | Nil #

[View source]
def find_within(tags, span : Nil, pointer : PointerDir) #

Method overload. If span is nil, output is nil.


[View source]
def find_within(tags, span : Timespan, pointer : PointerDir) : Timespan | Nil #

Recursively finds repeaters within other repeaters. Returns a Timespan representing the innermost time span or nil if no repeater union could be found


[View source]
def get_anchor(tokens, context = PointerDir::None, **options) #

[View source]
def get_repeaters(tokens) #

[View source]
def handle_generic(tokens, text = "", **options) #

Handle generic timestamp


[View source]
def handle_o_r_g_r(tokens, **options) #

Handle ordinal/repeater/grabber/repeater


[View source]
def handle_o_r_s_r(tokens, **options) #

Handle ordinal/repeater/separator/repeater


[View source]
def handle_od_rm(tokens, **options) #

Handle ordinal this month


[View source]
def handle_od_rmn(tokens, **options) : Timespan | Nil #

Handle ordinal-day/repeater-month-name


[View source]
def handle_od_rmn_sy(tokens, **options) #

Handle oridinal-day/repeater-month-name/scalar-year


[View source]
def handle_ordday(tokens, text = "", **options) #

[View source]
def handle_p_s_r(tokens, **options) #

Handle pointer/scalar/repeater


[View source]
def handle_r(tokens, **options) #

Handle repeaters


[View source]
def handle_r_g_r(tokens, **options) #

Handle repeater/grabber/repeater


[View source]
def handle_rdn_od(tokens, context = PointerDir::Future, **options) #

Handle RepeaterDayName OrdinalDay


[View source]
def handle_rdn_rmn_od(tokens, **options) #

Handle RepeaterDayName RepeaterMonthName OrdinalDay


[View source]
def handle_rdn_rmn_od_sy(tokens, **options) #

Handle RepeaterDayName RepeaterMonthName OrdinalDay ScalarYear


[View source]
def handle_rdn_rmn_sd(tokens, **options) #

Handle RepeaterDayName RepeaterMonthName ScalarDay


[View source]
def handle_rdn_rmn_sd_sy(tokens, **options) #

Handle RepeaterDayName RepeaterMonthName ScalarDay ScalarYear


[View source]
def handle_rdn_rmn_sd_t_tz_sy(tokens, text = "", **opts) #

[View source]
def handle_rfc3339(tokens, text = "", **options) #

[View source]
def handle_rfc3339_no_tz(tokens, text = "", **options) #

Actually SY-SM-SD-RT


[View source]
def handle_rmn_od(tokens, **options) #

Handle repeater-month-name/ordinal-day


[View source]
def handle_rmn_od_on(tokens, **options) #

Handle repeater-month-name/ordinal-day with separator-on


[View source]
def handle_rmn_od_sy(tokens, **options) #

Handle repeater-month-name/ordinal-day/scalar-year


[View source]
def handle_rmn_s_r_p(tokens, **options) #

Handle repeater/scalar/repeater/pointer


[View source]
def handle_rmn_sd(tokens, **options) #

Handle repeater-month-name/scalar-day


[View source]
def handle_rmn_sd_on(tokens, **options) #

Handle repeater-month-name/scalar-day with separator-on


[View source]
def handle_rmn_sd_sy(tokens, **options) #

Handle repeater-month-name/scalar-day/scalar-year


[View source]
def handle_rmn_sy(tokens, **options) #

Handle repeater-month-name/scalar-year


[View source]
def handle_rqn_sy(tokens, **options) #

Handle repeater-quarter-name/scalar-year


[View source]
def handle_s_r_a_s_r_p_a(tokens, **options) #

[View source]
def handle_s_r_p(tokens, **options) #

Handle scalar/repeater/pointer


[View source]
def handle_s_r_p_a(tokens, **options) #

Handle scalar/repeater/pointer/anchor


[View source]
def handle_sd_rmn(tokens, **options) #

Handle scalar-day/repeater-month-name


[View source]
def handle_sd_rmn_sy(tokens, **options) #

Handle scalar-day/repeater-month-name/scalar-year


[View source]
def handle_sd_sm(tokens, **options) #

Handle scalar-day/scalar-month


[View source]
def handle_sd_sm_sy(tokens, **options) #

Handle scalar-day/scalar-month/scalar-year (endian little)


[View source]
def handle_sm_rmn_sy(tokens, **options) #

[View source]
def handle_sm_sd(tokens, context = PointerDir::Future, **options) #

Handle scalar-month/scalar-day


[View source]
def handle_sm_sd_sy(tokens, **options) #

Handle scalar-month/scalar-day/scalar-year (endian middle)


[View source]
def handle_sm_sy(tokens, **options) #

Handle scalar-month/scalar-year


[View source]
def handle_sy_rmn_od(tokens, **options) #

[View source]
def handle_sy_rqn(tokens, **options) #

Handle scalar-year/repeater-quarter-name


[View source]
def handle_sy_sm(tokens, **options) #

Handle scalar-year/scalar-month


[View source]
def handle_sy_sm_sd(tokens, **options) #

Handle scalar-year/scalar-month/scalar-day


[View source]
def handle_year_and_month(year : Int32, month : Int32) #

[View source]
def subhandle_m_d(month, day, time_tokens, context = PointerDir::None, **options) #

Handle month/day


[View source]
def subhandle_orr(tokens, outer_span, **options) #

Handle ordinal repeaters


[View source]
def subhandle_srp(tokens, span : Timespan, **options) : Timespan | Nil #

Handle scalar/repeater/pointer helper


[View source]
def xxhandle_rfc3339_no_tz(tokens, text = "", **options) #

timestamp similar to rfc3339 but without trailing timezone


[View source]