note 51236 deleted from function.date by derick
| From: | derick@php.net | Date: | Sun, 15 Jan 2006 12:47:02 +0000 |
| Subject: | note 51236 deleted from function.date by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-101842@lists.php.net to get a copy of this message | ||
Note Submitter: david dot niry at wanadoo dot fr
----
After using this function, it appears there is a small error with the post from squid at
anime-sanctuary dot net. The logic is actually reversed.
if($cur_month>$dob_month || ($dob_month==$cur_month && $cur_day>=$dob_day))
return $cur_year-$dob_year;
else
return $cur_year-$dob_year-1;
SHOULD BE
if($cur_month>$dob_month || ($dob_month==$cur_month && $cur_day>$dob_day) )
return $cur_year-$dob_year-1;
else
return $cur_year-$dob_year;
Correct me if I am mistaken...