mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
[5.1.x] Fixed #35443 -- Changed ordinal to return negative numbers unchanged.
Previously, `-1` was converted to `"-1th"`. This has been updated to
return negative numbers "as is", so that for example `-1` is
converted to `"-1"`. This is now explicit in the docs.
Co-authored-by: Martin Jonson <artin.onson@gmail.com>
Backport of d3a7ed5bcc from main.
This commit is contained in:
committed by
Sarah Boyce
parent
bf9a89f5d1
commit
e65b7d5b06
@@ -55,6 +55,9 @@ class HumanizeTests(SimpleTestCase):
|
||||
"102",
|
||||
"103",
|
||||
"111",
|
||||
"-0",
|
||||
"-1",
|
||||
"-105",
|
||||
"something else",
|
||||
None,
|
||||
)
|
||||
@@ -70,6 +73,9 @@ class HumanizeTests(SimpleTestCase):
|
||||
"102nd",
|
||||
"103rd",
|
||||
"111th",
|
||||
"0th",
|
||||
"-1",
|
||||
"-105",
|
||||
"something else",
|
||||
None,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user