Method: ActiveScaffold::Finder::ClassMethods#parse_date_with_format
- Defined in:
- lib/active_scaffold/finder.rb
#parse_date_with_format(value, format) ⇒ Object
294 295 296 297 298 299 300 301 |
# File 'lib/active_scaffold/finder.rb', line 294 def parse_date_with_format(value, format) Date.strptime(value, *format) rescue StandardError => e = "Error parsing date from #{value}" << ", with format #{format}" if format Rails.logger.warn "#{}:\n#{e.}\n#{e.backtrace.join("\n")}" nil end |