fix: 修复重置天数微妙的偏差

This commit is contained in:
xream
2024-03-11 19:33:51 +08:00
parent 3b0dd362ce
commit 33de07268c
2 changed files with 2 additions and 1 deletions

View File

@@ -172,6 +172,7 @@ export function getRmainingDays(opt = {}) {
resetDate.setDate(resetDate.getDate() + cycleDays);
}
resetDate.setHours(0, 0, 0, 0);
const timeDiff = resetDate.getTime() - today.getTime();
const daysDiff = Math.ceil(timeDiff / (1000 * 3600 * 24));