diff --git a/src/utils/dates.js b/src/utils/dates.js index dbccfc135..d29009622 100644 --- a/src/utils/dates.js +++ b/src/utils/dates.js @@ -121,9 +121,10 @@ let dates = Object.assign(dateMath, { if (!unit) return Math.abs(+dateA - +dateB) - return Math.abs( + // the .round() handles an edge case + return Math.round(Math.abs( (+dates.startOf(dateA, unit) / MILLI[unit]) - (+dates.startOf(dateB, unit) / MILLI[unit]) - ) + )) }, total(date, unit) {