#30918: django.utils.timesince.timesince may return "0 minutes" ignoring the
time_strings
---------------------------------------+---------------------------
               Reporter:  webtweakers  |          Owner:  nobody
                   Type:  Bug          |         Status:  new
              Component:  Utilities    |        Version:  2.2
               Severity:  Normal       |       Keywords:  timesince
           Triage Stage:  Unreviewed   |      Has patch:  0
    Needs documentation:  0            |    Needs tests:  0
Patch needs improvement:  0            |  Easy pickings:  1
                  UI/UX:  0            |
---------------------------------------+---------------------------
 In the code, when `delta` is `datetime.timedelta(0)` (line 66), the
 condition `since <= 0` becomes true (line 70) and the function will return
 this:
 `return avoid_wrapping(gettext('0 minutes'))` (line 72)

 This should probably be:
 `return avoid_wrapping(time_strings['minute'] % 0)`

 Or alternatively the condition could be changed to `since < 0`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30918>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.3522ad9408fab51250488bca5bb8c4ee%40djangoproject.com.

Reply via email to