From 81dd5735eaa9415ebc8ec6f1588665a29a198806 Mon Sep 17 00:00:00 2001 From: domverse Date: Fri, 27 Feb 2026 15:24:55 +0100 Subject: [PATCH] feat: add weekday abbreviation to flight results table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each date row now shows e.g. "WED 2026-04-01" — the 3-letter weekday prefix is rendered in muted monospace before the date string. Co-Authored-By: Claude Sonnet 4.6 --- flight-comparator/frontend/src/pages/ScanDetails.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/flight-comparator/frontend/src/pages/ScanDetails.tsx b/flight-comparator/frontend/src/pages/ScanDetails.tsx index d5ca213..e2fd98b 100644 --- a/flight-comparator/frontend/src/pages/ScanDetails.tsx +++ b/flight-comparator/frontend/src/pages/ScanDetails.tsx @@ -29,6 +29,9 @@ const formatPrice = (price?: number) => const formatDate = (d: string) => new Date(d).toLocaleDateString('en-GB', { day: 'numeric', month: 'short', year: 'numeric' }); +const WEEKDAYS = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']; +const weekday = (d: string) => WEEKDAYS[new Date(d).getDay()]; + export default function ScanDetails() { const { id } = useParams<{ id: string }>(); const navigate = useNavigate(); @@ -383,7 +386,10 @@ export default function ScanDetails() { {(flightsByDest[route.destination] || []).map((f) => ( - {f.date} + + {weekday(f.date)} + {f.date} + {f.airline || '—'} {f.departure_time || '—'} {f.arrival_time || '—'}