note 48812 deleted from function.date by tularis
| From: | tularis@php.net | Date: | Sun, 30 Jan 2005 14:38:23 +0000 |
| Subject: | note 48812 deleted from function.date by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-84219@lists.php.net to get a copy of this message | ||
Note Submitter: info at oscaralexander dot com
----
Here's a briljant theory to calculate one's age :) Don't worry, I didn't come up
with this myself.
Subtract a persons date of birth (formatted without any separators) from the current date, divide
that number by 10.000 and round it down. i.e.:
$age = floor((20050107 - 19810304) / 10000);
How cool is that?! :)