export function formatDate(date: Date, format: string) { return format .replaceAll("%Y", date.getFullYear().toString()) .replaceAll("%M", (date.getMonth() + 1).toString().padStart(2, '0')) .replaceAll("%D", date.getDate().toString().padStart(2, '0')); }