feat(geplante-nachrichten): show age in birthday list
This commit is contained in:
@@ -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) };
|
||||
|
||||
Reference in New Issue
Block a user