mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2026-12-03 09:45:54 +00:00
fix: 修复重置天数微妙的偏差
This commit is contained in:
1 parent
3b0dd362ce
commit
33de07268c
2 files changed
+2
-1
No files matched your search
@@ -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));
|
||||
|
||||
|
||||
Reference in new issue
Block a user