rails/rails — pull request #5927 by avakhov (2012-04-22 08:59:12+00:00)
Title: Distance of time in words should work correct if from time > to_time

In accordance with documentation https://github.com/rails/rails/blob/master/actionpack/lib/action_view/helpers/date_helper.rb#L63-64 `distance_of_time_in_words` should have the same result independent of args order.

Because of leap years trick https://github.com/rails/rails/blob/master/actionpack/lib/action_view/helpers/date_helper.rb#L97-102 result for long time distances can differ.

In the test case which I added result was 'about 28 years' instead of 'almost 28 years`