webtrees icon indicating copy to clipboard operation
webtrees copied to clipboard

Would like to add the age next year range

Open MYLE-01 opened this issue 2 years ago • 2 comments

here

age

after a searching

found the lifespan() function in Individual.php line 466

found the Age bit also

never done PHP before

so my understanding is

        return I18N::translate(
            '%1$s–%2$s',
            '<span title="' . $birth_place . ' ' . $birth_date . '">' . $birth_year . '</span>',
            '<span title="' . $death_place . ' ' . $death_date . '">' . $death_year . '</span>'
        );

return the data I'm looking for SO can I just

        return I18N::translate(
            '%1$s–%2$s %3$s',
            '<span title="' . $birth_place . ' ' . $birth_date . '">' . $birth_year . '</span>',
            '<span title="' . $death_place . ' ' . $death_date . '">' . $death_year . '</span>',
            '<span title="">' . $Age . '</span>'
        );

I think that the Logic

but don't know how add the logic of if not dead show age as of now

have I miss the boat got it all wrong

MYLE-01 avatar Feb 24 '23 22:02 MYLE-01

but don't know how add the logic of if not dead show age as of now

You asked the same question on the forum, and I answered there.

fisharebest avatar Feb 25 '23 20:02 fisharebest

Greg, close this issue (the owner does not react).

arbor95 avatar Jan 26 '24 10:01 arbor95