Sha256: 04693491f8acf46681bce213cfbfbb9b80642773857fb4df127d787f83f85941
Contents?: true
Size: 401 Bytes
Versions: 2
Compression:
Stored size: 401 Bytes
Contents
module Chronic class TimeZone < Tag #:nodoc: 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) scan_for token, self, { /[PMCE][DS]T/i => :tz, /(tzminus)?\d{4}/ => :tz } end def to_s 'timezone' end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
chronic-0.4.1 | lib/chronic/time_zone.rb |
chronic-0.4.0 | lib/chronic/time_zone.rb |