merge upstream

Signed-off-by: wozulong <>
This commit is contained in:
wozulong
2024-08-06 15:54:28 +08:00
24 changed files with 242 additions and 112 deletions

View File

@@ -144,6 +144,12 @@ export function removeTrailingSlash(url) {
}
}
export function getTodayStartTimestamp() {
var now = new Date();
now.setHours(0, 0, 0, 0);
return Math.floor(now.getTime() / 1000);
}
export function timestamp2string(timestamp) {
let date = new Date(timestamp * 1000);
let year = date.getFullYear().toString();