def time_ago_in_words_or_date(date,options={})
      return unless date
      if (Time.now-date)/60/60/24 < 7
        time_ago_in_words(date) + " ago"
      elsif date.year == Time.now.year
        options[:short_format] ? date.strftime(options[:short_format]) : date.strftime("%b %e").gsub("  ", " ")
      else
        options[:long_format] ? date.strftime(options[:long_format]) : date.strftime("%b %e, %Y").gsub("  ", " ")
      end
    end
def time_ago_in_words_or_date(date,options={})
      return unless date
      if (Time.now-date)/60/60/24 < 7
        time_ago_in_words(date) + " ago"
      elsif date.year == Time.now.year
        options[:short_format] ? date.strftime(options[:short_format]) : date.strftime("%b %e").gsub("  ", " ")
      else
        options[:long_format] ? date.strftime(options[:long_format]) : date.strftime("%b %e, %Y").gsub("  ", " ")
      end
    end
Use words if within the last week, otherwise use date (show year if not this year)