diff --git a/docs/ref/contrib/humanize.txt b/docs/ref/contrib/humanize.txt
index 17db3c2..22efac9 100644
a
|
b
|
A set of Django template filters useful for adding a "human touch" to data.
|
10 | 10 | |
11 | 11 | To activate these filters, add ``'django.contrib.humanize'`` to your |
12 | 12 | :setting:`INSTALLED_APPS` setting. Once you've done that, use |
13 | | ``{% load humanize %}`` in a template, and you'll have access to these filters: |
| 13 | ``{% load humanize %}`` in a template, and you'll have access to the following |
| 14 | filters. |
14 | 15 | |
15 | 16 | apnumber |
16 | 17 | -------- |
… |
… |
number. This follows Associated Press style.
|
20 | 21 | |
21 | 22 | Examples: |
22 | 23 | |
23 | | * ``1`` becomes ``'one'``. |
24 | | * ``2`` becomes ``'two'``. |
| 24 | * ``1`` becomes ``one``. |
| 25 | * ``2`` becomes ``two``. |
25 | 26 | * ``10`` becomes ``10``. |
26 | 27 | |
27 | 28 | You can pass in either an integer or a string representation of an integer. |
… |
… |
Converts an integer to a string containing commas every three digits.
|
33 | 34 | |
34 | 35 | Examples: |
35 | 36 | |
36 | | * ``4500`` becomes ``'4,500'``. |
37 | | * ``45000`` becomes ``'45,000'``. |
38 | | * ``450000`` becomes ``'450,000'``. |
39 | | * ``4500000`` becomes ``'4,500,000'``. |
| 37 | * ``4500`` becomes ``4,500``. |
| 38 | * ``45000`` becomes ``45,000``. |
| 39 | * ``450000`` becomes ``450,000``. |
| 40 | * ``4500000`` becomes ``4,500,000``. |
40 | 41 | |
41 | 42 | You can pass in either an integer or a string representation of an integer. |
42 | 43 | |
… |
… |
numbers over 1 million.
|
48 | 49 | |
49 | 50 | Examples: |
50 | 51 | |
51 | | * ``1000000`` becomes ``'1.0 million'``. |
52 | | * ``1200000`` becomes ``'1.2 million'``. |
53 | | * ``1200000000`` becomes ``'1.2 billion'``. |
| 52 | * ``1000000`` becomes ``1.0 million``. |
| 53 | * ``1200000`` becomes ``1.2 million``. |
| 54 | * ``1200000000`` becomes ``1.2 billion``. |
54 | 55 | |
55 | 56 | Values up to 1000000000000000 (one quadrillion) are supported. |
56 | 57 | |
57 | 58 | You can pass in either an integer or a string representation of an integer. |
58 | 59 | |
59 | | ordinal |
60 | | ------- |
61 | | |
62 | | Converts an integer to its ordinal as a string. |
63 | | |
64 | | Examples: |
65 | | |
66 | | * ``1`` becomes ``'1st'``. |
67 | | * ``2`` becomes ``'2nd'``. |
68 | | * ``3`` becomes ``'3rd'``. |
69 | | |
70 | | You can pass in either an integer or a string representation of an integer. |
71 | | |
72 | 60 | naturalday |
73 | 61 | ---------- |
74 | 62 | |
… |
… |
For dates that are the current day or within one day, return "today",
|
78 | 66 | "tomorrow" or "yesterday", as appropriate. Otherwise, format the date using |
79 | 67 | the passed in format string. |
80 | 68 | |
81 | | **Argument:** Date formatting string as described in the :ttag:`now` tag. |
| 69 | **Argument:** Date formatting string as described in the :ttag:`date` tag. |
82 | 70 | |
83 | 71 | Examples (when 'today' is 17 Feb 2007): |
84 | 72 | |
… |
… |
Examples (when 'today' is 17 Feb 2007):
|
87 | 75 | * ``18 Feb 2007`` becomes ``tomorrow``. |
88 | 76 | * Any other day is formatted according to given argument or the |
89 | 77 | :setting:`DATE_FORMAT` setting if no argument is given. |
| 78 | |
| 79 | ordinal |
| 80 | ------- |
| 81 | |
| 82 | Converts an integer to its ordinal as a string. |
| 83 | |
| 84 | Examples: |
| 85 | |
| 86 | * ``1`` becomes ``1st``. |
| 87 | * ``2`` becomes ``2nd``. |
| 88 | * ``3`` becomes ``3rd``. |
| 89 | |
| 90 | You can pass in either an integer or a string representation of an integer. |