feat(geplante-nachrichten): show age in birthday list

This commit is contained in:
Matthias Hochmeister
2026-04-17 14:28:02 +02:00
parent 8ee2b9170d
commit 219e5f1195

View File

@@ -141,7 +141,8 @@ async function buildBirthdayList(startDate: Date, endDate: Date): Promise<{ item
const geb = new Date(r.geburtsdatum as string);
const day = String(geb.getDate()).padStart(2, '0');
const month = String(geb.getMonth() + 1).padStart(2, '0');
return `- ${r.vorname as string} ${r.nachname as string} (${day}.${month}.)`;
const age = startDate.getFullYear() - geb.getFullYear();
return `- ${r.vorname as string} ${r.nachname as string} (${day}.${month}., wird ${age})`;
});
return { items: lines.join('\n'), count: String(result.rows.length) };