Sha256: e20ecd6369f2abe4bc20123e87c21bd03d8ff79652176cdc478e63805a2e6d61
Contents?: true
Size: 550 Bytes
Versions: 1
Compression:
Stored size: 550 Bytes
Contents
require "timetwister/version" require "timetwister/parser" module Timetwister def self.parse(str, options={}) dates = { :original_string => str, :index_dates => [], :date_start => nil, :date_end => nil, :date_start_full => nil, :date_end_full => nil, :inclusive_range => nil, :certainty => nil } # defensive check - we don't want to try to parse certain malformed strings # (otherwise dates get flipped and types get wacky) if str.include?('??') return dates end return Parser.string_to_dates(str, dates, options) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
timetwister-0.0.1 | lib/timetwister.rb |