class Chronic::Scalar

def self.scan(tokens, options)

Returns:
  • (Array) - list of tokens

Parameters:
  • options (Hash) -- Options specified in {Chronic.parse}
  • tokens (Array) -- Array of tokens to scan
def self.scan(tokens, options)
  tokens.each_index do |i|
    if t = scan_for_scalars(tokens[i], tokens[i + 1]) then tokens[i].tag(t) end
    if t = scan_for_days(tokens[i], tokens[i + 1]) then tokens[i].tag(t) end
    if t = scan_for_months(tokens[i], tokens[i + 1]) then tokens[i].tag(t) end
    if t = scan_for_years(tokens[i], tokens[i + 1], options) then tokens[i].tag(t) end
  end
end