def relative_time_span(times)
times = [times.first, times.last].collect! { |t| t.to_time }
times.sort!
if times.first == times.last
"#{prettier_time(times.first)} #{relative_date(times.first)}"
elsif times.first.to_date == times.last.to_date
same_half = (times.first.hour/12 == times.last.hour/12)
"#{prettier_time(times.first, !same_half)} - #{prettier_time(times.last)} #{relative_date(times.first)}"
else
first = times.first; last = times.last; now = DateAndTime.time_class.now
arr = [prettier_time(first)]
arr << ' '
arr << first.strftime_ordinalized('%b %d')
arr << ", #{first.year}" unless first.year == last.year
arr << ' - '
arr << prettier_time(last)
arr << ' '
arr << last.strftime('%b') << ' ' unless first.year == last.year && first.month == last.month
arr << last.day.ordinalize
arr << ", #{last.year}" unless first.year == last.year && last.year == now.year
arr.to_s
end
end