Esempio n. 1
0
 public function calculateAgeOnDate($date)
 {
     $ageInfo = parseAgeInfo($this->dob, $date);
     return $ageInfo['age'];
 }
Esempio n. 2
0
/**
 * Function to find age in months (with decimal) on the target date
 *
 * @param  string  $dob     date of birth
 * @param  string  $target  date to calculate age on
 * @return float            months(decimal) from dob to target(date)
 */
function convertDobtoAgeMonthDecimal($dob, $target)
{
    $ageInfo = parseAgeInfo($dob, $target);
    return $ageInfo['age_in_months'];
}