mirror: show github timestamps in metadata

This commit is contained in:
Arunavo Ray
2025-10-24 08:42:14 +05:30
parent 025df12bef
commit e7a102ee45
3 changed files with 37 additions and 5 deletions

View File

@@ -29,6 +29,15 @@ export function formatDate(date?: Date | string | null): string {
}).format(new Date(date));
}
export function formatDateShort(date?: Date | string | null): string | undefined {
if (!date) return undefined;
return new Intl.DateTimeFormat("en-US", {
year: "numeric",
month: "short",
day: "numeric",
}).format(new Date(date));
}
export function formatLastSyncTime(date: Date | string | null): string {
if (!date) return "Never";