fix: 'end_date must come after start_date' error

fix: Pressing the Usage Check Button prompts an error message "end_date must come after start_date"
This commit is contained in:
灯火不休时
2023-04-29 16:19:28 +08:00
committed by GitHub
parent b0cd8579f1
commit db567f0bad

View File

@@ -102,7 +102,7 @@ export async function requestUsage() {
.getDate()
.toString()
.padStart(2, "0")}`;
const ONE_DAY = 2 * 24 * 60 * 60 * 1000;
const ONE_DAY = 1 * 24 * 60 * 60 * 1000;
const now = new Date(Date.now() + ONE_DAY);
const startOfMonth = new Date(now.getFullYear(), now.getMonth(), 1);
const startDate = formatDate(startOfMonth);