note 63836 added to function.mktime

From: Date: Sat, 01 Apr 2006 09:54:41 +0000
Subject: note 63836 added to function.mktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-107124@lists.php.net to get a copy of this message
how to accurately calculate your age ? <? $year=1976; $month=10; $day=12; $birthday=mktime(0,0,0,$month,$day,$year); $now=time(); $daytime=$now-$birthday; $age=$daytime/365/24/60/60; echo $age; ?> maybe there are many bissextile year during your life. so you should divide 366 sometimes. so the algorithm is not good. who give one good algorightm for this situation? thanks a lot. ---- Server IP: 66.163.161.117 Probable Submitter: 221.189.180.172 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.mktime.php Edit -- http://master.php.net/note/edit/63836 Del: integrated -- http://master.php.net/note/delete/63836/integrated Del: useless -- http://master.php.net/note/delete/63836/useless Del: bad code -- http://master.php.net/note/delete/63836/bad+code Del: spam -- http://master.php.net/note/delete/63836/spam Del: non-english -- http://master.php.net/note/delete/63836/non-english Del: in docs -- http://master.php.net/note/delete/63836/in+docs Del: other reasons-- http://master.php.net/note/delete/63836 Reject -- http://master.php.net/note/reject/63836 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#107124) next »