Hi,
> I want to show the age of someone :
> <%= time_ago_in_words(@user.birth_date) %>
> Give me "Over x years", but i want "x years"
> In the localization file, x_years doesn't exist too.
> Is there a way to do this ?
You could do it on your own, without using distance_of_time_in_words:
<%= t('datetime.distance_in_words.x_years', :count => ((Time.now -
@user.birth_date) / 1.year).to_i) %>
regards,
Andreas Neuhaus
http://zargony.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"rails-i18n" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rails-i18n?hl=en
-~----------~----~----~----~------~----~------~--~---