fix(ui): use Math.floor instead of Math.round for day_diff
This commit is contained in:
parent
8aae2c921b
commit
44da9da9f7
1 changed files with 1 additions and 1 deletions
|
|
@ -16,7 +16,7 @@ function prettyDate(date, mini) {
|
|||
|
||||
let today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
||||
let event_day = new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
||||
let day_diff = Math.round((today - event_day) / 86400000);
|
||||
let day_diff = Math.floor((today - event_day) / 86400000);
|
||||
|
||||
if (isNaN(day_diff) || day_diff < 0) return "";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue