class ActiveSupport::Duration

def in_months

9.weeks.in_months # => 2.07

Returns the amount of months a duration covers as a float
def in_months
  in_seconds / SECONDS_PER_MONTH.to_f
end