From: IamPersistent Date: Tue, 30 Nov 2010 11:09:14 +0000 (-0800) Subject: add instructions for the current date X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=167e2d8a0d8a5c7be15c2cf8120a4bc1b76fab8e;p=web%2Fkonrad%2Ftwig.git add instructions for the current date --- diff --git a/doc/02-Twig-for-Template-Designers.markdown b/doc/02-Twig-for-Template-Designers.markdown index 5797df3..1435422 100644 --- a/doc/02-Twig-for-Template-Designers.markdown +++ b/doc/02-Twig-for-Template-Designers.markdown @@ -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`