Method: XlsFunction::Converters::TimeConverter.parse

Defined in:
lib/xls_function/converters/time_converter.rb

.parse(date, now = Time.now, &block) ⇒ Object

Accepts elapsed time expression that Time.parse cannot parse.



95
96
97
98
99
100
101
102
# File 'lib/xls_function/converters/time_converter.rb', line 95

def parse(date, now = Time.now, &block)
  Time.parse(date, now, &block)
rescue ArgumentError
  result = fix_elapsed_time(date, now)
  raise if result == :throw

  Time.parse(result, now, &block)
end