# Time\_ago\_in\_words in days only?

**URL:** <https://www.ruby-forum.com/t/time-ago-in-words-in-days-only/85976>\
**Category:** Rails\
**Created:** [February 18, 2007, 2:54pm UTC](https://www.ruby-forum.com/t/time-ago-in-words-in-days-only/85976 "2007-02-18T14:54:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![miked](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@miked](https://www.ruby-forum.com/u/miked)\
**Post date:** [February 18, 2007, 2:54pm UTC](https://www.ruby-forum.com/t/time-ago-in-words-in-days-only/85976/1 "2007-02-18T14:54:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![miked](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@miked](https://www.ruby-forum.com/u/miked)\
**Post date:** [February 18, 2007, 4:54pm UTC](https://www.ruby-forum.com/t/time-ago-in-words-in-days-only/85976/2 "2007-02-18T16:54:42Z")

</div>

Hi,

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

Regards,  
Oyku.

---

<div class="post-metadata">

**Author:** ![miked](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@miked](https://www.ruby-forum.com/u/miked)\
**Post date:** [February 18, 2007, 5:39pm UTC](https://www.ruby-forum.com/t/time-ago-in-words-in-days-only/85976/3 "2007-02-18T17:39:48Z")

</div>

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 D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![miked](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@miked](https://www.ruby-forum.com/u/miked)\
**Post date:** [February 18, 2007, 5:48pm UTC](https://www.ruby-forum.com/t/time-ago-in-words-in-days-only/85976/4 "2007-02-18T17:48:53Z")

</div>

removed\_email\_address@domain.invalid 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 D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

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
