Testing testing testing

We’ll estimate how many days you have left in your life, based on the
Social Security
Administration
actuarial tables. Just give us your birth date, and we’ll
do the rest. These numbers are more optimistic than the
New York State actuarial tables, so yay!
(We don’t store this data anywhere, but you can do the calculations yourself
instead if you like.)

/ /
mm / dd / yyyy

Female
Male


ho there!

“;
$birthmonth = 2;
$birthdate = 9;
$birthyear = 1976;

$curdate = date(d);
$curmonth = date(m);
$curyear = date(Y);

$curdaynum = cal_to_jd(CAL_JULIAN, $curmonth, $curdate, $curyear);
$birthdaynum = cal_to_jd(CAL_JULIAN, $birthmonth, $birthdate, $birthyear);
$caredaynum = cal_to_jd(CAL_JULIAN, $birthmonth, $birthdate, $curyear);
echo”curdaynum $curdaynum birthdaynum $birthdaynum $caredaynum”;

$age = floor(($curdaynum – $birthdaynum) / 365);

// $gender = $_POST[gender];
$gender = “female”;
echo “

it is now $curmonth / $curdate / $curyear. You were born $birthmonth / $birthdate / $birthyear .

“;
echo “

you are a $gender and $age years old.

“;

// $age = 34;
$xml = simplexml_load_file(‘http://17000-days.com/wp-content/life.xml’);
foreach ($xml->record as $rec) {
//echo “record $rec->age $rec->male $rec->female
“;
if ($rec->age == $age) {
if ($gender == “male”) {
$yrsleft = $rec->male;
}
else {
$yrsleft = $rec->female;
}
}
}
echo”

You have $yrsleft years left.

“;
$leaps = ($yrsleft / 4);
$death = floor($caredaynum + (365 * (float)$yrsleft) + $leaps);
echo “death $death caredaynum $caredaynum yrsleft $yrsleft leaps $leaps”;
$dd = jdtojulian($death);
$death -= $curdaynum;
echo”

You are projected to die on $dd; you have $death days left.

“;

}
?>

Leave a Reply