note 28453 deleted from ref.datetime by vincent

From: Date: Thu, 11 Sep 2003 11:57:00 +0000
Subject: note 28453 deleted from ref.datetime by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-56084@lists.php.net to get a copy of this message
Note Submitter: NO.php@SPAM.typetango.com ---- // returns person's age in years // accepts person's birthday in 'Y-m-d' format function find_age($birthday) { list($byear, $bmonth, $bday) = explode('-', $birthday); list($cyear, $cmonth, $cday) = explode('-', date('Y-m-d')); $cday -= $bday; $cmonth -= $bmonth; $cyear -= $byear; if($cday < 0) $cmonth--; if($cmonth < 0) $cyear--; return $cyear; }

« previous php.notes (#56084) next »