I'm trying to use TimeDifference to find the difference in months between two dates. I'd expect the difference between 2017-09-04 and 2017-12-04 to be exactly 3.0.
But this happens:
TimeDifference.between(Time.new(2017, 9, 4), Time.new(2017, 12, 4)).in_months
#=> 2.99
TimeDifference.between(Time.new(2017, 8, 4), Time.new(2017, 11, 4)).in_months
#=> 3.02
Would it make sense to add an #in_calendar_months or similar that takes into account the different lengths of different months?