I end up using a custom template tag by 'realmac' found here:
http://www.djangosnippets.org/snippets/557/ that calculate the age
from the birthdate and only returns the years.


On Apr 18, 11:06 pm, Bastien <bastien.roche...@gmail.com> wrote:
> Hi,
>
> I'm using the timesince filter in a template where I print a list of
> users along with some info about these users. Among this info I print
> the user's age which I get from the user's birthdate and I return the
> result of {{ user.get_profile.birthdate|timesince }} to get the age.
> Everything works fine but the format returned is of the type 'year,
> month' and I just want to print the year. I tried to format this with |
> date or with |time or to find some doc about this but I can't get
> nowhere.
>
> Anybody has an idea? Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to