strtotime
| From: | John Taylor-Johnston | Date: | Sun, 17 Oct 2010 05:48:31 +0000 |
| Subject: | strtotime | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-308758@lists.php.net to get a copy of this message | ||
$now=date("Y-m-d");
A = $mydata->birthday = 1928-02-12;
B = $mydata->birthday = 1965-03-18;
C = $mydata->birthday = 1976-04-11;
I'm doing a demographic sort.
How do I calculate whether $mydata->Birthday falls into these categories below?
I'm working my way right now through the manual: http://ca.php.net/manual/en/function.strtotime.php.
I cannot just calculate:
$mydata->birthday - $now = X age bracket.
80+ year category | A |
70+ year category
60+ year category
50+ year category
40+ year category | B |
30+ year category | C |
21+ year category
Thans for any inspiration. I can find and hack code. I'm just like to understand it myself.
John