From dd99d00d16676668d9afca962d3f46f712140ac7 Mon Sep 17 00:00:00 2001 From: ktmouk Date: Wed, 19 Jun 2024 21:56:33 +0900 Subject: [PATCH] fix: calculating the difference in days is not correct (#5) --- apps/web/src/app/[locale]/_components/TimeEntryTreeItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/app/[locale]/_components/TimeEntryTreeItem.tsx b/apps/web/src/app/[locale]/_components/TimeEntryTreeItem.tsx index e0ac444..983514f 100644 --- a/apps/web/src/app/[locale]/_components/TimeEntryTreeItem.tsx +++ b/apps/web/src/app/[locale]/_components/TimeEntryTreeItem.tsx @@ -33,7 +33,7 @@ export const TimeEntryTreeItem = ({ new Intl.RelativeTimeFormat(locale, { numeric: "auto", }).format( - differenceInDays(startOfDay(now), startOfDay(startedAt)), + differenceInDays(startOfDay(startedAt), startOfDay(now)), "day", ), )