Forum: Ruby on Rails distance_of_time_in_words_to_now

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
pd (Guest)
on 2006-01-27 06:28
any idea how to use distance_of_time_in_words_to_now?
Mikkel B. (Guest)
on 2006-01-27 10:35
pd wrote:
> any idea how to use distance_of_time_in_words_to_now?

<%=distance_of_time_in_words_to_now(@some_date)%>
Jakob S. (Guest)
on 2006-01-27 11:00
(Received via mailing list)
pd wrote:
> any idea how to use distance_of_time_in_words_to_now?

Say, in a view:

<%= distance_of_time_in_words_to_now(Time.now) %>

would output "less than a minute".
This topic is locked and can not be replied to.