From 2826e561cfa099d9199f387aad5fae81cf2b0f66 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Tue, 3 Oct 2023 11:06:58 -0700 Subject: [PATCH] Fix for minimum date unit. --- src/lib/date.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/date.ts b/src/lib/date.ts index bfbfc0b913..4b9589514d 100644 --- a/src/lib/date.ts +++ b/src/lib/date.ts @@ -248,7 +248,7 @@ export function getMinimumUnit(startDate, endDate) { return 'minute'; } else if (differenceInHours(endDate, startDate) <= 48) { return 'hour'; - } else if (differenceInCalendarDays(endDate, startDate) <= 90) { + } else if (differenceInCalendarMonths(endDate, startDate) <= 12) { return 'day'; } else if (differenceInCalendarMonths(endDate, startDate) <= 24) { return 'month';