Re: printing current date

From: Date: Fri, 10 Aug 2001 01:27:22 +0000
Subject: Re: printing current date
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1324@lists.php.net to get a copy of this message
What about calling it $smarty.time since time() is what you would call in php to get the timestamp anyway? Jason ----- Original Message ----- From: "Monte Ohrt" <monte@ispi.net> To: <smarty@lists.ispi.net> Sent: Thursday, August 09, 2001 10:45 AM Subject: [smarty] printing current date > I need a bit of feedback :-) > > Currently, there is no way to print the current date in Smarty. You must > always assign the current date to the template. We are going to add a > special variable to Smarty that always contains the current date. > > {$smarty.now} > {$smarty.now|date_format:"%Y"} > > > My question is, what should the name be? Will "now" make sense for > everyone? > > other ideas: > {$smarty.date} > {$smarty.date_current} > {$smarty.datetime} > > > Also, "now" would actually be the current date and time, a unix > datestamp for passing to date_format. Sound good? > > Monte > > --- > You are currently subscribed to smarty as: sweatjejm@home.com > To unsubscribe send a blank email to $subst('Email.Unsub') > Visit Smarty's homepage at > http://www.phpinsider.com/php/code/Smarty/

« previous php.smarty.general (#1324) next »