[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