app/Statistics/Repository/FamilyRepository.php
private function calculateAge(int $age): string
    {
        if ((int) ($age / 365.25) > 0) {
            $result = (int) ($age / 365.25) . 'y';
        } elseif ((int) ($age / 30.4375) > 0) {
            $result = (int) ($age / 30.4375) . 'm';
        } else {
            $result = $age . 'd';
        }

        return FunctionsDate::getAgeAtEvent($result);
    }
private function calculateAge(int $age): string
    {
        if ((int) ($age / 365.25) > 0) {
            $result = (int) ($age / 365.25) . 'y';
        } elseif ((int) ($age / 30.4375) > 0) {
            $result = (int) ($age / 30.4375) . 'm';
        } else {
            $result = $age . 'd';
        }

        return FunctionsDate::getAgeAtEvent($result);
    }
private function calculateAge ( int $ age ) : string { if ( ( int ) ( $ age / 365.25 ) > 0 ) { $ result = ( int ) ( $ age / 365.25 ) . 'y' ; } elseif ( ( int ) ( $ age / 30.4375 ) > 0 ) { $ result = ( int ) ( $ age / 30.4375 ) . 'm' ; } else { $ result = $ age . 'd' ; } return FunctionsDate :: getAgeAtEvent ( $ result ) ; }
Returns the calculated age the time of event.

@param int $age The age from the database record

@return string
Returns the calculated age the time of event .