From a352318e8ac15aecbeaab95626631ba40e55014b Mon Sep 17 00:00:00 2001 From: "simon.franken" Date: Wed, 18 Feb 2026 12:43:17 +0100 Subject: [PATCH] adapts time format --- frontend/src/pages/DashboardPage.tsx | 8 +++++--- frontend/src/pages/TimeEntriesPage.tsx | 7 +++++-- frontend/src/utils/dateUtils.ts | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/frontend/src/pages/DashboardPage.tsx b/frontend/src/pages/DashboardPage.tsx index 88263af..9e31629 100644 --- a/frontend/src/pages/DashboardPage.tsx +++ b/frontend/src/pages/DashboardPage.tsx @@ -5,6 +5,7 @@ import { ProjectColorDot } from "@/components/ProjectColorDot"; import { StatCard } from "@/components/StatCard"; import { formatDate, + formatTime, formatDurationFromDatesHoursMinutes, formatDurationHoursMinutes, calculateDuration, @@ -120,9 +121,10 @@ export function DashboardPage() { - - {formatDate(entry.startTime)} - + +
{formatDate(entry.startTime)}
+
{formatTime(entry.startTime)} – {formatTime(entry.endTime)}
+ {formatDurationFromDatesHoursMinutes(entry.startTime, entry.endTime)} diff --git a/frontend/src/pages/TimeEntriesPage.tsx b/frontend/src/pages/TimeEntriesPage.tsx index 5847ad4..3cc77f9 100644 --- a/frontend/src/pages/TimeEntriesPage.tsx +++ b/frontend/src/pages/TimeEntriesPage.tsx @@ -5,7 +5,7 @@ import { useProjects } from '@/hooks/useProjects'; import { Modal } from '@/components/Modal'; import { Spinner } from '@/components/Spinner'; import { ProjectColorDot } from '@/components/ProjectColorDot'; -import { formatDate, formatDurationFromDatesHoursMinutes, getLocalISOString, toISOTimezone } from '@/utils/dateUtils'; +import { formatDate, formatTime, formatDurationFromDatesHoursMinutes, getLocalISOString, toISOTimezone } from '@/utils/dateUtils'; import type { TimeEntry, CreateTimeEntryInput, UpdateTimeEntryInput } from '@/types'; export function TimeEntriesPage() { @@ -117,7 +117,10 @@ export function TimeEntriesPage() { {data?.entries.map((entry) => ( - {formatDate(entry.startTime)} + +
{formatDate(entry.startTime)}
+
{formatTime(entry.startTime)} – {formatTime(entry.endTime)}
+
diff --git a/frontend/src/utils/dateUtils.ts b/frontend/src/utils/dateUtils.ts index 6ba8522..dcc8d92 100644 --- a/frontend/src/utils/dateUtils.ts +++ b/frontend/src/utils/dateUtils.ts @@ -7,7 +7,7 @@ export function formatDate(date: string | Date): string { export function formatTime(date: string | Date): string { const d = typeof date === "string" ? parseISO(date) : date; - return format(d, "h:mm a"); + return format(d, "HH:mm"); } export function formatDateTime(date: string | Date): string {