Project

General

Profile

Feature #4050 » 0002-Round-up-Rational-value.patch

Alexey Froloff, 2009-10-18 12:51

View differences:

config/initializers/10-patches.rb
49 49
      def distance_of_date_in_words(from_date, to_date = 0, options = {})
50 50
        from_date = from_date.to_date if from_date.respond_to?(:to_date)
51 51
        to_date = to_date.to_date if to_date.respond_to?(:to_date)
52
        distance_in_days = (to_date - from_date).abs
52
        distance_in_days = (to_date - from_date).abs.round
53 53

  
54 54
        I18n.with_options :locale => options[:locale], :scope => :'datetime.distance_in_words' do |locale|
55 55
          case distance_in_days
(6-6/14)