Django

Code

Ticket #3311: naturalday_docs_v3.diff

File naturalday_docs_v3.diff, 0.8 kB (added by Jyrki Pulliainen <jyrki.pulliainen@gmail.com>, 2 years ago)

New docs for latest changes

  • add_ons.txt

    old new  
    130130 
    131131You can pass in either an integer or a string representation of an integer. 
    132132 
     133naturalday 
     134---------- 
     135 
     136Converts a date to natural string, if it's today, tomorrow or yesterday 
     137 
     138**Argument:** Date formatting string as described in default tag now_. 
     139 
     140.. _now: ../templates/#now 
     141 
     142Examples (when 'today' is 17 Feb 2007): 
     143 
     144    * ``16 Feb 2007`` becomes ``yesterday``. 
     145    * ``17 Feb 2007`` becomes ``today``. 
     146    * ``18 Feb 2007`` becomes ``tomorrow``. 
     147    * Any other day is formatted according to given argument or `DATE_FORMAT`_ if 
     148      argument is not given. 
     149 
     150.. _DATE_FORMAT: ../settings/#date_format 
     151 
    133152flatpages 
    134153========= 
    135154