Code

Ticket #3311: naturalday_docs_r4537.diff

File naturalday_docs_r4537.diff, 658 bytes (added by Jyrki Pulliainen <jyrki.pulliainen@…>, 7 years ago)

Documentation for naturalday

Line 
1Index: add_ons.txt
2===================================================================
3--- add_ons.txt (revision 4537)
4+++ add_ons.txt (working copy)
5@@ -130,6 +130,21 @@
6 
7 You can pass in either an integer or a string representation of an integer.
8 
9+naturalday
10+----------
11+
12+Converts a date to natural string, if it's today, tomorrow or yesterday
13+
14+Examples:
15+
16+    Today is 17 Feb 2007
17+    * ``16 Feb 2007`` becomes ``yesterday``
18+    * ``17 Feb 2007`` becomes ``today``
19+    * ``18 Feb 2007`` becomes ``tomorrow``
20+    * ``15 Feb 2007`` becomes whatever `DATE_FORMAT`_ specifies
21+
22+.. _DATE_FORMAT: ../settings/#date_format
23+
24 flatpages
25 =========
26