Forum: Ruby on Rails time_ago_in_words in days only?

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.
39025a7f572d6fe464e1fe6be399ca3b?d=identicon&s=25 Mike Dershowitz (mdersh53)
on 2007-02-18 14:54
Hi:

I'm using the time_ago_in_words in words function. Is there anyway to
get it to register only in days - some options I'm not setting?  Meaning
to display in days only, so instead of going to a month, year, etc., to
register a #of days?  I looked in the api for the function and don't see
it.

If not, is there another function of which I'm not aware?

Thanks so much in advance!

Mike
8589dbd737a28d39bb1dcd5251262e3b?d=identicon&s=25 Oyku Gencay (Guest)
on 2007-02-18 16:54
(Received via mailing list)
Hi,

I remember seeing this as a new feature in Rails 1.2 bundled
ActiveSupport library.

Regards,
Oyku.
65cf838378fb068035070ffe60c76e97?d=identicon&s=25 jamiequint@gmail.com (Guest)
on 2007-02-18 17:39
(Received via mailing list)
Rails Pre-1.2 did this, you could grab the old time_ago_in _words and
use it to override the new one in your app.

~Jamie

On Feb 18, 5:54 am, Mike Dershowitz <rails-mailing-l...@andreas-s.net>
39025a7f572d6fe464e1fe6be399ca3b?d=identicon&s=25 Mike Dershowitz (mdersh53)
on 2007-02-18 17:48
jamiequint@gmail.com wrote:
> Rails Pre-1.2 did this, you could grab the old time_ago_in _words and
> use it to override the new one in your app.
>
> ~Jamie
>
> On Feb 18, 5:54 am, Mike Dershowitz <rails-mailing-l...@andreas-s.net>

Hi Jamie:

Thanks very much for your reply.  Are you talking about extending and
overriting time_ago_in_words or is there some parameter that would do
it?

Thanks again!

Mike
This topic is locked and can not be replied to.