feat: mail telegram and cron check
This commit is contained in:
1 parent
6e1d0a7568
commit
8b33242db1
6 files changed
+180
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import { formatEuro } from "./vouchers";
|
||||
|
||||
function formatDatum(d: string | Date): string {
|
||||
if (typeof d === "string") return d;
|
||||
return d.toLocaleDateString("de-DE", { day: "2-digit", month: "2-digit", year: "numeric" });
|
||||
}
|
||||
|
||||
export function buildReminderText(v: { name: string; restCents: number; ablaufdatum: string | Date }): string {
|
||||
return `Gutschein "${v.name}" läuft am ${formatDatum(v.ablaufdatum)} ab. Restguthaben: ${formatEuro(v.restCents)}.`;
|
||||
}
|
||||
Reference in new issue
Block a user