Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Julia Briggs
March 21, 2005, 1:45 am
rate this thread
Hello, I am trying to find a workaround for the Unix date issue to
calculate ages based on a persons birthdate and the current date. Here
is the code I am working with now,
$dob = "10 July 1981";
$dob = strtotime($dob);
$today1 = strtotime ('now');
$f_date1 = $person_dob;
$difference = intval(((($f_date1 - $today1)/86400+1)*-1)/365);
This obvisouly will work, until I start inputting birthdates pre-1970.
Is there something better (that is accurate) which will calculate &
accept the long birthdate format I am using here?
Re: problem with this age validator - workarounds?
I noticed that Message-ID:
Briggs contained the following:
Look at the last entry here
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker /