Skip to content

Commit

Permalink
rounding date diff
Browse files Browse the repository at this point in the history
  • Loading branch information
cauemarcondes committed Mar 8, 2021
1 parent ee9e73c commit 648f0f4
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,14 @@ function getSelectOptions({
}),
};

const dateDiff = getDateDifference({
start: momentStart,
end: momentEnd,
unitOfTime: 'days',
precise: true,
});
const dateDiff = Math.round(
getDateDifference({
start: momentStart,
end: momentEnd,
unitOfTime: 'days',
precise: true,
})
);

const isRangeToNow = rangeTo === 'now';

Expand Down

0 comments on commit 648f0f4

Please sign in to comment.