class Chronic::TimeZone
def self.scan(tokens, options)
-
(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_all(tokens[i]) then tokens[i].tag(t); next end end end
def self.scan_for_all(token)
-
(TimeZone, nil)
-
Parameters:
-
token
(Token
) --
def self.scan_for_all(token) scan_for token, self, { /[PMCE][DS]T/i => :tz, /(tzminus)?\d{4}/ => :tz } end
def to_s
def to_s 'timezone' end