Author: jezdez Date: 2012-02-13 12:57:44 -0800 (Mon, 13 Feb 2012) New Revision: 17520
Modified: django/trunk/docs/ref/templates/builtins.txt django/trunk/docs/releases/1.4-beta-1.txt django/trunk/docs/releases/1.4.txt django/trunk/docs/topics/i18n/formatting.txt Log: Added a note to the release notes about the new format strings added in r17473. Modified: django/trunk/docs/ref/templates/builtins.txt =================================================================== --- django/trunk/docs/ref/templates/builtins.txt 2012-02-13 10:51:17 UTC (rev 17519) +++ django/trunk/docs/ref/templates/builtins.txt 2012-02-13 20:57:44 UTC (rev 17520) @@ -1361,6 +1361,10 @@ The ``c`` and ``u`` format specification characters were added in Django 1.2. +.. versionadded:: 1.4 + +The ``e`` and ``o`` format specification characters were added in Django 1.4. + For example:: {{ value|date:"D d M Y" }} Modified: django/trunk/docs/releases/1.4-beta-1.txt =================================================================== --- django/trunk/docs/releases/1.4-beta-1.txt 2012-02-13 10:51:17 UTC (rev 17519) +++ django/trunk/docs/releases/1.4-beta-1.txt 2012-02-13 20:57:44 UTC (rev 17520) @@ -502,6 +502,28 @@ :djadmin:`startproject`. If you want to use this feature in an existing project, there is a :ref:`migration guide <time-zones-migration-guide>`. +Two new date format strings +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Two new :tfilter:`date` formats for use in template filters, template tags +and :ref:`format-localization`: + +- ``e`` -- the name of the timezone of the given datetime object +- ``o`` -- the ISO 8601 year number + +Please make sure to update your :ref:`custom format files +<custom-format-files>` if they contain either ``e`` or ``o`` in a format +string. For example a Spanish localization format previously only escaped the +``d`` format character:: + + DATE_FORMAT = r'j \de F \de Y' + +But now it needs to also escape ``e`` and ``o``:: + + DATE_FORMAT = r'j \d\e F \d\e Y' + +For more information, see the :tfilter:`date` documentation. + Minor features ~~~~~~~~~~~~~~ Modified: django/trunk/docs/releases/1.4.txt =================================================================== --- django/trunk/docs/releases/1.4.txt 2012-02-13 10:51:17 UTC (rev 17519) +++ django/trunk/docs/releases/1.4.txt 2012-02-13 20:57:44 UTC (rev 17520) @@ -490,6 +490,28 @@ client's response contains a given HTML fragment. See the :ref:`assertion documentation<assertions>` for more. +Two new date format strings +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Two new :tfilter:`date` formats for use in template filters, template tags +and :ref:`format-localization`: + +- ``e`` -- the name of the timezone of the given datetime object +- ``o`` -- the ISO 8601 year number + +Please make sure to update your :ref:`custom format files +<custom-format-files>` if they contain either ``e`` or ``o`` in a format +string. For example a Spanish localization format previously only escaped the +``d`` format character:: + + DATE_FORMAT = r'j \de F \de Y' + +But now it needs to also escape ``e`` and ``o``:: + + DATE_FORMAT = r'j \d\e F \d\e Y' + +For more information, see the :tfilter:`date` documentation. + Minor features ~~~~~~~~~~~~~~ Modified: django/trunk/docs/topics/i18n/formatting.txt =================================================================== --- django/trunk/docs/topics/i18n/formatting.txt 2012-02-13 10:51:17 UTC (rev 17519) +++ django/trunk/docs/topics/i18n/formatting.txt 2012-02-13 20:57:44 UTC (rev 17520) @@ -149,6 +149,8 @@ control localization over a large section of a template, use the :ttag:`localize` template tag. +.. _custom-format-files: + Creating custom format files ============================ -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.