Thursday, November 22, 2012

How can I contrast two date-time type variables in template layer?

For example, art_time is a date-time type.
As we know, {{ art_time|timesince }} return the time since art_time to now. However, I want to know how to judge whether the result is within 24 hours.
Shortly, how to know whether art_time is today or the day before today in template layer?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/KNz6tfyDn8sJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate