From 167e2d8a0d8a5c7be15c2cf8120a4bc1b76fab8e Mon Sep 17 00:00:00 2001 From: IamPersistent Date: Tue, 30 Nov 2010 03:09:14 -0800 Subject: [PATCH] add instructions for the current date --- doc/02-Twig-for-Template-Designers.markdown | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) 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` -- 1.7.2.5