I'm pleased that they found a work around for this. The downside is that its only available on versions 5.1.0+.
The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer). However, before PHP 5.1.0 this range was limited from 01-01-1970 to 19-01-2038 on some systems (e.g. Windows).
In otherwords, you cannot work with date functions if your version is older than this, and cannot support negative numbers. I believe this will lead you to your only alternative: manual calculations (or to move to a unix platform )
That should work for ya. Though I have a feeling this is easier to do... where's marek and raaf when you need them, lol.
$birthday = '1955-06-13';
list($BYear, $BMonth, $BDay) = explode('-', $birthday);
$CYear = date('Y');
$CMonth = date('m');
$CDay = date('d');
$age = 0;
if (!empty($BYear) && $BYear < $CYear)
$age += $CYear - $BYear;
if (!empty($BMonth) && !empty($BDay))
$monthDiff = $CMonth - $BMonth;
$dayDiff = $CDay - $BDay;
if ($monthDiff < 0 || ($monthDiff == 0 && $dayDiff < 0))
$age -= 1;