Re: determining age from birthdate

From: Date: Wed, 29 Nov 2000 21:37:26 +0000
Subject: Re: determining age from birthdate
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-27888@lists.php.net to get a copy of this message
You can use Date_Calc to get the number of seconds between the two dates, then divide that number by the number of seconds in a year. Count leap years if you want to be exact. You can also use mktime() as long as the birthdate is on or after 1970. http://www.phpinsider.com/php/code/Date_Calc Paul Tuohy wrote: > > I have all the parts of a birth date and i want to determine the present age > of the person submitting the data. How can I do this with PHP? > > the birth date info comes to me in this form: > > Year: 'yyyy' > month: 'mm' > day: 'dd'

« previous php.general (#27888) next »