add instructions for the current date
authorIamPersistent <develop@zestic.com>
Tue, 30 Nov 2010 11:09:14 +0000 (03:09 -0800)
committerFabien Potencier <fabien.potencier@gmail.com>
Tue, 30 Nov 2010 12:58:45 +0000 (13:58 +0100)
doc/02-Twig-for-Template-Designers.markdown

index 5797df3..1435422 100644 (file)
@@ -1058,7 +1058,11 @@ The `date` filter is able to format a date to a given format:
 
 The `date` filter accepts any date format supported by
 [`DateTime`](http://www.php.net/manual/en/datetime.construct.php) and
-`DateTime` instances.
+`DateTime` instances. For instance, to display the current date, filter the
+word "now":
+
+    [twig]
+    {{ "now"|date("m/d/Y") }}
 
 ### `format`