summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMads Jensen <mje@inducks.org>2016-12-29 11:53:55 +0100
committerTim Graham <timograham@gmail.com>2016-12-30 13:48:12 -0500
commit4a6dc71cae8e83445e87c6fccbc58702a05fbd47 (patch)
tree3072f9a9b715cbe1bc270da271b876618868ca01 /docs
parentf5e0e15ef893a6cca69dbea2da043cc751b60739 (diff)
[1.10.x] Fixed #27652 -- Doc'd that intcomma works with floats.
Backport of 398a859642636a2de0ab920befa320cd9954b49a from master
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/humanize.txt12
1 files changed, 5 insertions, 7 deletions
diff --git a/docs/ref/contrib/humanize.txt b/docs/ref/contrib/humanize.txt
index 0c0714f801..fc6a222b58 100644
--- a/docs/ref/contrib/humanize.txt
+++ b/docs/ref/contrib/humanize.txt
@@ -34,11 +34,13 @@ You can pass in either an integer or a string representation of an integer.
``intcomma``
============
-Converts an integer to a string containing commas every three digits.
+Converts an integer or float (or a string representation of either) to a string
+containing commas every three digits.
Examples:
* ``4500`` becomes ``4,500``.
+* ``4500.2`` becomes ``4,500.2``.
* ``45000`` becomes ``45,000``.
* ``450000`` becomes ``450,000``.
* ``4500000`` becomes ``4,500,000``.
@@ -49,15 +51,13 @@ e.g. with the ``'de'`` language:
* ``45000`` becomes ``'45.000'``.
* ``450000`` becomes ``'450.000'``.
-You can pass in either an integer or a string representation of an integer.
-
.. templatefilter:: intword
``intword``
===========
-Converts a large integer to a friendly text representation. Works best for
-numbers over 1 million.
+Converts a large integer (or a string representation of an integer) to a
+friendly text representation. Works best for numbers over 1 million.
Examples:
@@ -74,8 +74,6 @@ e.g. with the ``'de'`` language:
* ``1200000`` becomes ``'1,2 Million'``.
* ``1200000000`` becomes ``'1,2 Milliarden'``.
-You can pass in either an integer or a string representation of an integer.
-
.. templatefilter:: naturalday
``naturalday``