Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added a note to the release notes about the new format strings added …

…in r17473.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17520 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit bd13cfa917d3cc4dc854fc0d486adcb45f5b551a 1 parent 4f1ac8f
Jannis Leidel authored February 13, 2012
4  docs/ref/templates/builtins.txt
@@ -1361,6 +1361,10 @@ Z                 Time zone offset in seconds. The          ``-43200`` to ``4320
1361 1361
 
1362 1362
 The ``c`` and ``u`` format specification characters were added in Django 1.2.
1363 1363
 
  1364
+.. versionadded:: 1.4
  1365
+
  1366
+The ``e`` and ``o`` format specification characters were added in Django 1.4.
  1367
+
1364 1368
 For example::
1365 1369
 
1366 1370
     {{ value|date:"D d M Y" }}
22  docs/releases/1.4-beta-1.txt
@@ -502,6 +502,28 @@ Time zone support is enabled by default in new projects created with
502 502
 :djadmin:`startproject`. If you want to use this feature in an existing
503 503
 project, there is a :ref:`migration guide <time-zones-migration-guide>`.
504 504
 
  505
+Two new date format strings
  506
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
  507
+
  508
+Two new :tfilter:`date` formats for use in template filters, template tags
  509
+and :ref:`format-localization`:
  510
+
  511
+- ``e`` -- the name of the timezone of the given datetime object
  512
+- ``o`` -- the ISO 8601 year number
  513
+
  514
+Please make sure to update your :ref:`custom format files
  515
+<custom-format-files>` if they contain either ``e`` or ``o`` in a format
  516
+string. For example a Spanish localization format previously only escaped the
  517
+``d`` format character::
  518
+
  519
+  DATE_FORMAT = r'j \de F \de Y'
  520
+
  521
+But now it needs to also escape ``e`` and ``o``::
  522
+
  523
+  DATE_FORMAT = r'j \d\e F \d\e Y'
  524
+
  525
+For more information, see the :tfilter:`date` documentation.
  526
+
505 527
 Minor features
506 528
 ~~~~~~~~~~~~~~
507 529
 
22  docs/releases/1.4.txt
@@ -490,6 +490,28 @@ the ``html=True`` flag with
490 490
 client's response contains a given HTML fragment. See the :ref:`assertion
491 491
 documentation<assertions>` for more.
492 492
 
  493
+Two new date format strings
  494
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
  495
+
  496
+Two new :tfilter:`date` formats for use in template filters, template tags
  497
+and :ref:`format-localization`:
  498
+
  499
+- ``e`` -- the name of the timezone of the given datetime object
  500
+- ``o`` -- the ISO 8601 year number
  501
+
  502
+Please make sure to update your :ref:`custom format files
  503
+<custom-format-files>` if they contain either ``e`` or ``o`` in a format
  504
+string. For example a Spanish localization format previously only escaped the
  505
+``d`` format character::
  506
+
  507
+  DATE_FORMAT = r'j \de F \de Y'
  508
+
  509
+But now it needs to also escape ``e`` and ``o``::
  510
+
  511
+  DATE_FORMAT = r'j \d\e F \d\e Y'
  512
+
  513
+For more information, see the :tfilter:`date` documentation.
  514
+
493 515
 Minor features
494 516
 ~~~~~~~~~~~~~~
495 517
 
2  docs/topics/i18n/formatting.txt
@@ -149,6 +149,8 @@ To force localization of a single value, use :tfilter:`localize`. To
149 149
 control localization over a large section of a template, use the
150 150
 :ttag:`localize` template tag.
151 151
 
  152
+.. _custom-format-files:
  153
+
152 154
 Creating custom format files
153 155
 ============================
154 156
 

0 notes on commit bd13cfa

Please sign in to comment.
Something went wrong with that request. Please try again.