method

normalize_distance_of_time_argument_to_time

rails latest stable - Class: ActionView::Helpers::DateHelper
normalize_distance_of_time_argument_to_time(value)
private

No documentation available.

# File actionview/lib/action_view/helpers/date_helper.rb, line 699
        def normalize_distance_of_time_argument_to_time(value)
          if value.is_a?(Numeric)
            Time.at(value)
          elsif value.respond_to?(:to_time)
            value.to_time
          else
            raise ArgumentError, "#{value.inspect} can't be converted to a Time value"
          end
        end