Re: printing current date

From: Date: Fri, 10 Aug 2001 13:20:09 +0000
Subject: Re: printing current date
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1327@lists.php.net to get a copy of this message
I don't think that is so important. We want what would be easiest for the template designers, not necessarily what will match up to PHP functions. I want to print the current date, so I use "time" to get that? "datetime" or "now" is more accurate. Jason Sweat wrote: > > 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/ -- Monte Ohrt <monte@ispi.net> http://www.ispi.net/

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