fix(ui): use Math.floor instead of Math.round for day_diff

This commit is contained in:
Kaushal Shriwas 2026-04-12 14:23:00 +05:30
parent 8aae2c921b
commit 44da9da9f7

View file

@ -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 "";