add end date and create logo and fix filter
This commit is contained in:
@@ -17,3 +17,13 @@ export function formatDate(date: Date | string): string {
|
||||
dateStyle: "long",
|
||||
}).format(new Date(date));
|
||||
}
|
||||
|
||||
export function formatDateRange(
|
||||
start: Date | string,
|
||||
end?: Date | string | null
|
||||
): string {
|
||||
const startStr = formatDate(start);
|
||||
if (!end) return startStr;
|
||||
const endStr = formatDate(end);
|
||||
return `${startStr} — ${endStr}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user