Skip to content

Commit 447edac

Browse files
Fix from @sytone (#845)
1 parent 1fd95ab commit 447edac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Urgency.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ export class Urgency {
1313

1414
if (task.dueDate !== null) {
1515
// Map a range of 21 days to the value 0.2 - 1.0
16-
const daysOverdue =
17-
window.moment().diff(task.dueDate) / Urgency.milliSecondsPerDay;
16+
const daysOverdue = Math.round(
17+
window.moment().diff(task.dueDate) / Urgency.milliSecondsPerDay,
18+
);
1819

1920
let dueMultiplier: number;
2021
if (daysOverdue >= 7.0) {

0 commit comments

Comments
 (0)