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.
37f1fc6cee7436912b393ddf539a1888?d=identicon&s=25 pd (Guest)
on 2006-01-27 05:28
any idea how to use distance_of_time_in_words_to_now?
C7669e8b5676f61fdf202230cbcf72d8?d=identicon&s=25 Mikkel Bruun (mikkel)
on 2006-01-27 09:35
pd wrote:
> any idea how to use distance_of_time_in_words_to_now?

<%=distance_of_time_in_words_to_now(@some_date)%>
317aad7f9f0b69a440faca74bbe22b20?d=identicon&s=25 Jakob Skjerning (Guest)
on 2006-01-27 10: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.