1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Refs #33879 -- Fixed plural value deprecation warnings.

Plural value must be an integer.

Regression in 8d67e16493.
This commit is contained in:
Mariusz Felisiak 2023-01-11 12:49:12 +01:00 committed by GitHub
parent d16079dd90
commit 4593bc5da1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,7 +104,7 @@ def timesince(d, now=None, reversed=False, time_strings=None, depth=2):
remaining_time = (now - pivot).total_seconds()
partials = [years, months]
for chunk in TIME_CHUNKS:
count = remaining_time // chunk
count = int(remaining_time // chunk)
partials.append(count)
remaining_time -= chunk * count