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.
* type: Bug => Cleanup/optimization
* version: 2.2 => master
* stage: Unreviewed => Accepted
Comment:
Thanks for this report. I'm not sure if it's an issue for any language but
I agree that we should use `time_strings['minute'] % 0`.
--
Ticket URL: <https://code.djangoproject.com/ticket/30918#comment:1>
* status: new => assigned
* owner: nobody => Hasan Ramezani
--
Ticket URL: <https://code.djangoproject.com/ticket/30918#comment:2>
* has_patch: 0 => 1
Comment:
Note:
[https://docs.djangoproject.com/en/2.2/ref/contrib/humanize/#naturaltime
naturaltime] doesn't fall back to `timesince()` if the value is less than
a day old, moreover the `time_string` argument is not documented, so it's
not an issue in supported use cases. However, I agree that we can change
this for consistency because someone can use `timesince()/timeuntil()` in
custom filters.
--
Ticket URL: <https://code.djangoproject.com/ticket/30918#comment:3>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"52cb4190720f6ba9dd1cdb9cbd516733b1d4ca58" 52cb4190]:
{{{
#!CommitTicketReference repository=""
revision="52cb4190720f6ba9dd1cdb9cbd516733b1d4ca58"
Fixed #30918 -- Made timesince()/timeuntil() respect custom time strings
for future and the same datetimes.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30918#comment:4>