class ActiveSupport::Duration

def in_weeks

2.months.in_weeks # => 8.696

Returns the amount of weeks a duration covers as a float
def in_weeks
  in_seconds / SECONDS_PER_WEEK.to_f
end