note 42870 deleted from function.date by kennyt
| From: | kennyt@php.net | Date: | Sun, 18 Jul 2004 17:20:00 +0000 |
| Subject: | note 42870 deleted from function.date by kennyt | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-73501@lists.php.net to get a copy of this message | ||
Note Submitter: ahbruinsma@hotmail.com
----
About dylan's how-old-function, their is a little mistake in it, you should use:
if (($TodayMonth > $DOBArray[1]) || (($TodayMonth == $DOBArray[1]) && ($TodayDay >=
$DOBArray[2])))
$Age = $TodayYear - $DOBArray[0];
instead of
if (($TodayMonth > $DOBArray[1]) || (($TodayMonth == $DOBArray[1]) && ($TodayDay <=
$DOBArray[2])))
$Age = $TodayYear - $DOBArray[0];
Notice the '>' instead of '<'.