Re: html_select_date

From: Date: Thu, 29 Mar 2001 15:26:44 +0000
Subject: Re: html_select_date
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-499@lists.php.net to get a copy of this message
I made a change that affects date_format, html_select_date and html_select_time. You can pass any arbitrary date string to the functions (as long as it is somewhat parsable), or a unix timestamp or a mysql timestamp. They should all work. Replace your Smarty.addons.php file with this one, or specifically, replace smarty_mod_date_format(), smarty_mod_html_select_date(), smarty_mod_html_select_time() and add the new function smarty_make_timestamp(). Let me know how your tests go. This will be committed in the next release. Here is a test I did: TEMPLATE: {$date1}, {$date2}, {$date3}, {$date4}, {$date5}, {$date6} 1:{$date1|date_format} 2:{$date2|date_format} 3:{$date3|date_format} 4:{$date4|date_format} 5:{$date5|date_format} 6:{$date6|date_format} OUTPUT: 20010329, 2001-03-29, 2001/03/29, 03/29/2001, 985845600, 20010329000000 1:Mar 29, 2001 2:Mar 29, 2001 3:Mar 29, 2001 4:Mar 29, 2001 5:Mar 29, 2001 6:Mar 29, 2001 Jonas Bengtsson wrote: > > Is there any way to make the html_select_date shown the date in the > following way: > YYYY MM DD in only numbers? > > Thanks in advance! > Jonas Bengtsson > > --- > 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 (#499) next »