Skip to content

Commit

Permalink
Fix for minimum date unit.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao authored and briancao committed Oct 3, 2023
1 parent c96f317 commit 2826e56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 2826e56

Please sign in to comment.