# File lib/rbot/core/utils/utils.rb, line 245 def Utils.timeago(time, options = {}) start_date = options.delete(:start_date) || Time.new date_format = options.delete(:date_format) || :default delta_minutes = (start_date.to_i - time.to_i).floor / 60 if delta_minutes.abs <= (8724*60) # eight weeks? I'm lazy to count days for longer than that distance = Utils.distance_of_time_in_words(delta_minutes); if delta_minutes < 0 _("%{d} from now") % {:d => distance} else _("%{d} ago") % {:d => distance} end else return _("on %{date}") % {:date => system_date.to_formatted_s(date_format)} end end