浏览代码

documentation

Tiago Garcia 12 年之前
父节点
当前提交
34eb7ab371
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      Resources/doc/reference/field_types.rst

+ 5 - 2
Resources/doc/reference/field_types.rst

@@ -9,8 +9,8 @@ There are many field types that can be used in the list action or show action :
 * array: display value from an array
 * boolean: display a green or red picture dependant on the boolean value, this type accepts an ``editable``
   parameter to edit the value from within the list or the show actions
-* date: display a formatted date
-* datetime: display a formatted date and time
+* date: display a formatted date. Accepts an optional ``format`` parameter
+* datetime: display a formatted date and time. Accepts an optional ``format`` parameter
 * text: display a text
 * trans: translate the value with a provided ``catalogue`` option
 * string: display a text
@@ -25,6 +25,9 @@ There are many field types that can be used in the list action or show action :
     
     Option for currency type must be an official ISO code, example : EUR for "euros".
     List of iso code : http://en.wikipedia.org/wiki/List_of_circulating_currencies
+    
+    In ``date`` and ``datetime`` field types, ``format`` pattern must match twig's
+    ``date`` filter specification, available at: http://twig.sensiolabs.org/doc/filters/date.html
 
 More types might be provided based on the persistency layer defined. Please refer to their
 related documentations.