大调整

This commit is contained in:
liushiwei
2023-08-22 20:16:59 +08:00
parent f03d1ccf2e
commit 3bd2c7d246
12 changed files with 996 additions and 44 deletions

View File

@@ -12,3 +12,13 @@ export function timestampToTime(timestamp) {
let s = (date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds());
return Y + M + D + h + m + s;
}
export function formatDate(date) {
let Y = date.getFullYear() + "-";
let M =
(date.getMonth() + 1 < 10
? "0" + (date.getMonth() + 1)
: date.getMonth() + 1) + "-";
let D = (date.getDate() < 10 ? "0" + date.getDate() : date.getDate());
return Y + M + D;
}