Re: date_format and additional parms (not the number but the type)

From: Date: Thu, 29 Mar 2001 14:41:17 +0000
Subject: Re: date_format and additional parms (not the number but the type)
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-495@lists.php.net to get a copy of this message
You could use strtotime() to convert a string to a timestamp. It should be able to figure it out if the string is a valid date. It should handle mysql timestamps just fine too. {$date|strtotime|date_format} Marc Logemann wrote: > > Hi, > > i am just wondering if it would be useful to have more than one > style of input paramter in date_format, right now its a wrapper > of strftime(), thus only unix timestamp is allowed. > > Wouldnt it be useful to have date, datetime or mysql_timestamp as > possible paramters? I mean a lot of people have date or mysql_timestamp > instead of unix timestamp in their databases. > > If it is useful i could make a first code draft for this... > > ----------------------- > Marc Logemann > Morelogs GmbH & Co. KG > Chief Software Architect > ----------------------- > > --- > You are currently subscribed to smarty as: monte@ispi.net > 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 (#495) next »