Ticket #3311: naturalday_docs_v3.diff

File naturalday_docs_v3.diff, 817 bytes (added by Jyrki Pulliainen <jyrki.pulliainen@…>, 8 years ago)

New docs for latest changes

  • add_ons.txt

     
    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
Back to Top