From 94cd3f7eb4b97a22a24d73d3aac4d95f5a9c24e7 Mon Sep 17 00:00:00 2001 From: Davide Scaini Date: Sun, 24 May 2026 14:01:53 +0200 Subject: [PATCH] fix: show replacement dates as dd/mm/yyyy --- site/src/components/AthleteView.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/site/src/components/AthleteView.svelte b/site/src/components/AthleteView.svelte index d23fb23..862722f 100644 --- a/site/src/components/AthleteView.svelte +++ b/site/src/components/AthleteView.svelte @@ -83,6 +83,11 @@ const GEAR_ICONS: Record = { bike: '🚲', shoes: '👟', skis: '🎿', other: '⚙️' }; + function fmtDate(iso: string): string { + const [y, m, d] = iso.split('-'); + return `${d}/${m}/${y}`; + } + const PART_SUGGESTIONS: Record = { bike: { name: 'chain', threshold_km: 3000 }, shoes: { name: 'running shoes', threshold_km: 750 }, @@ -751,7 +756,7 @@
{#each part.replacements.slice().reverse().slice(0, 3) as rep (rep.id)}
- {rep.date} + {fmtDate(rep.date)} {#if rep.note}{rep.note}{/if}