mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #7743: Reverted [8483], which was itself a reversion of [8481], after confirmation from Malcolm. Corrected a long standing mistake in the timesince/timeuntil filters when using a parameter for 'now'. Thanks to Andrew Shearer <ashearerw@shearersoftware.com> for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8535 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
78bdff1adc
commit
06d49768bd
4 changed files with 27 additions and 5 deletions
|
@ -1330,7 +1330,7 @@ Takes an optional argument that is a variable containing the date to use as
|
|||
the comparison point (without the argument, the comparison point is *now*).
|
||||
For example, if ``blog_date`` is a date instance representing midnight on 1
|
||||
June 2006, and ``comment_date`` is a date instance for 08:00 on 1 June 2006,
|
||||
then ``{{ comment_date|timesince:blog_date }}`` would return "8 hours".
|
||||
then ``{{ blog_date|timesince:comment_date }}`` would return "8 hours".
|
||||
|
||||
Minutes is the smallest unit used, and "0 minutes" will be returned for any
|
||||
date that is in the future relative to the comparison point.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue