diff --git a/src/components/FixtureRow.tsx b/src/components/FixtureRow.tsx index e4d2f40..cd35259 100644 --- a/src/components/FixtureRow.tsx +++ b/src/components/FixtureRow.tsx @@ -12,6 +12,17 @@ function FixtureRow({fixture}: FixtureRowProps) { return null; } + const date = new Date(fixture.date); + + function formattedTime(date: Date) { + let hours = date.getHours(); + hours = hours % 12 || 12; + let minutes = date.getMinutes().toString(); + minutes = minutes.padStart(2, '0'); + const ampm = date.getHours() >= 12 ? 'PM' : 'AM'; + return `${hours}:${minutes} ${ampm}`; + } + return ( <>