Add recovery Excel export and automatic account detection

This commit is contained in:
巫凤萍
2026-08-05 11:40:29 +08:00
parent b081946752
commit 85110bbfce
15 changed files with 852 additions and 36 deletions

View File

@@ -2,6 +2,7 @@ import assert from "node:assert/strict";
import test from "node:test";
import {
formatShanghaiDate,
formatShanghaiToday,
parseStoredDate,
} from "../lib/date-utils.ts";
@@ -14,3 +15,7 @@ test("treats D1 CURRENT_TIMESTAMP values as UTC and displays Beijing time", () =
test("keeps date-only deadlines on the intended Shanghai calendar date", () => {
assert.match(formatShanghaiDate("2026-08-12"), /08\/12/);
});
test("formats the dashboard date from the Shanghai calendar", () => {
assert.equal(formatShanghaiToday(new Date("2026-08-04T16:30:00Z")), "8月5日");
});