Skip to content

Commit

Permalink
removed rounding from daysBetween and added toPrecision
Browse files Browse the repository at this point in the history
  • Loading branch information
DevinaG007 committed Mar 10, 2024
1 parent 98acfa1 commit e33a6be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/dates.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ export function getDaysBetweenDates(firstDate, secondDate) {
const secondsBetween = secondTime - firstTime;
const daysBetween = secondsBetween / ONE_DAY_IN_MILLISECONDS;
// Round number here
return Math.round(daysBetween);
return daysBetween.toPrecision(3);
}

0 comments on commit e33a6be

Please sign in to comment.