Feature #4050 » 0002-Round-up-Rational-value.patch
| config/initializers/10-patches.rb | ||
|---|---|---|
|
def distance_of_date_in_words(from_date, to_date = 0, options = {})
|
||
|
from_date = from_date.to_date if from_date.respond_to?(:to_date)
|
||
|
to_date = to_date.to_date if to_date.respond_to?(:to_date)
|
||
|
distance_in_days = (to_date - from_date).abs
|
||
|
distance_in_days = (to_date - from_date).abs.round
|
||
|
I18n.with_options :locale => options[:locale], :scope => :'datetime.distance_in_words' do |locale|
|
||
|
case distance_in_days
|
||