note 35839 deleted from function.mktime by sniper
| From: | sniper@php.net | Date: | Tue, 04 Nov 2003 13:09:56 +0000 |
| Subject: | note 35839 deleted from function.mktime by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-59863@lists.php.net to get a copy of this message | ||
Note Submitter: bruno.denis@parisfree.com
----
Why do complex while easier (instead of mktime blablabla (DOES NOT WORK < 69))
Warning : Date in European format (change tab[x]) to make it work where required.
function age($date1)
{
$tab1 = explode('.', $date1);
$tab2 = date("Y");
$age = $tab2-$tab1[2];
if ((date("m") < $tab1[1]) && (date("d") <= $tab1[0])) $age--;
return $age;
}