I have to determin if a person is eligible based on them turning 65. I need to know if they are with in a window of 120 days from the first day of the month of them turning 65. This window is 120 days in the future or 120 days in the past from the first day of the month of their 65th birthday.
I am not sure how to come up with this. Here is what I have so far:
$bday = new DateTime('2.12.1945');
$today = new DateTime('2010-08-01 00:00:00'); // for testing purposes
$diff = $today->diff($bday);
printf('%d years, %d month, %d days', $diff->y, $diff->m, $diff->d);
I am a bit lost so far.