Thanks for your prompt attention:
Here is the relevant calling code with the actual calling statement at
line 3:
$dateparts=date("m/d/Y");
for ($i=1;$i<31;$i++) {
$dateval = incdate($dateparts,$i);
if ($edit == "EDIT" && $dateval = $il_status) {
$did = 1;
echo("<option value='" . $dateval . "' selected>" . $dateval .
"</option>"); }
else {
echo("<option value='" . $dateval . "' >" . $dateval .
"</option>"); }
}
>----------
>From: Bug Database[SMTP:[EMAIL PROTECTED]]
>Sent: Monday, January 29, 2001 2:16 PM
>To: Gordon Lillibridge
>Subject: PHP 4.0 Bug #8987 Updated: arg returned from function comes back as
>string 'ready', regardless of actual
>
>ID: 8987
>Updated by: derick
>Reported By: [EMAIL PROTECTED]
>Old-Status: Open
>Status: Closed
>Bug Type: Unknown/Other Function
>Assigned To:
>Comments:
>
>Could you post the calling code as .txt on the web somewhere for us to see.
>This is almost certain a user error and not a bug.
>
>Previous Comments:
>---------------------------------------------------------------------------
>
>[2001-01-29 16:42:06] [EMAIL PROTECTED]
>I created the function [==
> function incdate($datei,$inc) {
> $dateparts =explode("/",$datei);
> $day = $dateparts[1] + $inc;
> $month = $dateparts[0];
> $year = $dateparts[2];
> $dec = 0;
> //echo($datei . "cc" . $day . "cc" . $month . "cc" . $year . "<br>");
> if($day > 31 && ($month == 1 || $month == 3 || $month == 5 || $month == 7
>|| $month == 8 || $month == 10 || $month == 12)) { $dec=31; }
> if($day > 30 && ($month == 4 || $month == 6 || $month == 9 || $month ==
>11)) { $dec=30; }
> if($day > 28 && $month == 2 && $year % 4 != 0) {$dec=28;}
> if($day > 29 && $month == 2 && $year % 4 == 0) {$dec=29;}
> while ($dec != 0 ) {
> $day = $day - $dec;
> $month++;
> if ($month > 12) { $year++; $month = 1; }
> $dec = 0;
> if ($day > 31 && ($month == 1 || $month == 3 || $month == 5 || $month
>== 7 || $month == 8 || $month == 10 || $month == 12)) { $dec=31; }
> if ($day > 30 && ($month == 4 || $month == 6 || $month == 9 || $month
>== 11)) { $dec=30; }
> if ($day > 28 && $month == 2 && $year % 4 != 0) {$dec=28;}
> if ($day > 29 && $month == 2 && $year % 4 == 0) {$dec=29;}
> }
> //echo ("out: " . $month . "/" . $day . "/" . $year . "<br>");
> $outdat = "f" . $month . "-" . $day . "-" . $year;
> return $outdat;
> }
>==]
>it returns 'ready' to the calling statement, regardless of the actual value
>of '$outdat'.
>I haved tried many variations in my code, but the result does not change.
>
>---------------------------------------------------------------------------
>
>
>Full Bug description available at: http://bugs.php.net/?id=8987
>
>
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]