class SmartTime::Parser::SmartDateParser
Private Class Methods
_default_formats()
click to toggle source
# File lib/smart_time/parser/smart_date_parser.rb, line 7 def self._default_formats defined?(Date::DATE_FORMATS) ? Date::DATE_FORMATS.values : [] end
_parse_with_format(value, format)
click to toggle source
# File lib/smart_time/parser/smart_date_parser.rb, line 11 def self._parse_with_format(value, format) Date.strptime(value, format) rescue nil end