[Help] Birthday calendar entry - showing also the age on the title

Hi :slight_smile:

Hopefully the developer of the contacts app is reading this :wink:

The app works very good. The contacts app also creates a birthday calendar, thatโ€™s top! :slight_smile:
What is created is something like โ€œJohn Doe (*1980)โ€. It shows the year of the birthday, which is nice. But it would be also nice, if there would be shown how old the person is: โ€œJohn Doe (37)โ€. If the string in brackets would be configurable, that would be awesome :slight_smile:

Many greetings, Frank

Evolution is doing this

Thank you for your comment. โ€œEvolutionโ€ seems to be an app for desktop systems.

What I need is a CalDAV and CardDAV system, which can host my contacts and automatically add birthday reminders to the cloud calendar, which is hosted on a Synology NAS, for example.
So the nextcloud Contacts App which is installable on a Synology NAS fulfills my needs quite good. Some more configuration options as mentioned would be great.

I donโ€™t know if there are similar systems like the nextcloud Contacts App are available.

Many greetings, Frank

Well, I did a little hack and now there is also displayed the age.

In the file ~/apps/dav/lib/CalDAV/BirthdayService.php there is the string generated for the birthday calendar.

I replaced:

$summary = $title . โ€™ (โ€™ . $summarySymbol . $date->format(โ€˜Yโ€™) . โ€˜)โ€™;

by the following lines:

$actyear = date(โ€˜Yโ€™, time());
$age = (int)$actyear - (int)substr((string)$birthday, 0, 4);

$summary = $title . โ€™ (โ€™ . $summarySymbol . $date->format(โ€˜Yโ€™) . โ€˜) [โ€™ . $age . โ€˜]โ€™;

Now you get for example the title โ€œJohn Doe (*1980) [37]โ€

Many greetings, Frank

2 Likes