newbie: How do I convert "about 2 hours ago" to "today"?

DAN wrote:

I'm using distance_of_time_in_words to generate friendly text but not sure it's the right method to say something was entered "today".

Is there an option or other process to use to achieve the text reading "today" rather than about xx hours ago? I'marst ting to think I need to create a new helper method or edit the configs or something.

module ApplicationHelper   def today_or_time_ago_in_words(time)     (time.to_date == Time.now.to_date ? 'today' : time_ago_in_words(time))   end end

today_or_time_ago_in_words(Time.new)

=> "today"

today_or_time_ago_in_words(Time.gm(2006, "Dec", 1, 11, 0, 0))

=> "6 days"

Cheers,

Mark