|
|
@@ -124,3 +124,23 @@ Argument Description
|
|
124
|
124
|
``basket`` The basket instance to calculate shipping charges for
|
|
125
|
125
|
``name`` The variable name to assign the charge to
|
|
126
|
126
|
=================== =====================================================
|
|
|
127
|
+
|
|
|
128
|
+Datetime filters
|
|
|
129
|
+-------------
|
|
|
130
|
+
|
|
|
131
|
+Load these tags using ``{% load datetime_filters %}``.
|
|
|
132
|
+
|
|
|
133
|
+``timedelta``
|
|
|
134
|
+~~~~~~~~~~~~~~~~~
|
|
|
135
|
+
|
|
|
136
|
+Returns a human-readable string representation of a time delta, in the current locale:
|
|
|
137
|
+
|
|
|
138
|
+.. code-block:: html+django
|
|
|
139
|
+
|
|
|
140
|
+ Time since creation: {{ basket.time_since_creation|timedelta }}
|
|
|
141
|
+
|
|
|
142
|
+This renders something like:
|
|
|
143
|
+
|
|
|
144
|
+.. code-block:: html
|
|
|
145
|
+
|
|
|
146
|
+ Time since creation: 2 days
|