Re: Fixed html_select_date and html_select_time
| From: | Andrei Zmievski | Date: | Tue, 04 Sep 2001 15:02:32 +0000 |
| Subject: | Re: Fixed html_select_date and html_select_time | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1429@lists.php.net to get a copy of this message | ||
On Mon, 03 Sep 2001, Alexander Skwar wrote:
Content-Description: My Message
> Hi!
>
> I fixed up the html_select_date and html_select_time functions again.
>
> First, I added all the options from html_select_date to html_select_time
> (where applicable). This makes those two functions be somewhat "in
> sync" again.
>
> Next, I added 3 options to html_select_date:
>
> /* Which date should be selected? */
> /* Useful for "ancient" times (pre 1970) or */
> /* very distant times (post 2031) */
> /* If set, the value from XY_select is preferred */
> $day_select = null;
> $month_select = null;
> $year_select = null;
>
> I did this, because I noticed that for early years, pre-selecting dates
> does not work. This is, because mktime() returns negative values for
> pre-1970 years. I haven't tested post-2031 (?) dates, but I suspect
> that there may be errors on some (32-bit) platforms as well.
>
> The patch contains diff's agains Smarty.addons.php and docs.sgm from the
> 31-Aug-2001 09:27 snapshot as can be downloaded from the Smarty website.
Why does your patch have diff's for the stuff I already integrated? And
please, use the same conventions that we do (like in comments, for
example).
-Andrei
The main reason Santa is so jolly is because he knows where
all the bad girls live. -- George Carlin