feat: cleanup assessmentsOverview

This commit is contained in:
SethBurkart123
2025-06-06 11:52:24 +10:00
parent c4dc4b58b8
commit 7a91550de5
4 changed files with 14 additions and 14 deletions
@@ -19,7 +19,9 @@ export function formatDate(dateStr: string, submitted?: boolean): string {
// If it's within a week
if (diffDays <= 7) {
return d.toLocaleDateString(undefined, { weekday: 'long' });
const weekdayName = d.toLocaleDateString(undefined, { weekday: 'long' });
// If it's in the past, add "Last" prefix
return diffDays < 0 ? `Last ${weekdayName}` : weekdayName;
}
// Otherwise show full date