done: 第一版demo

This commit is contained in:
cancerai committed 2026-10-15 22:09:59 +08:00
commit 0853ecfa24
8 files changed
+305

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
export function log(msg: string) {
const date = new Date()
const year = date.getFullYear()
const month = (date.getMonth()+1).toString().padStart(2, "0")
const day = date.getDate().toString().padStart(2, "0")
const hour = date.getHours().toString().padStart(2, "0")
const minutes = date.getMinutes().toString().padStart(2, "0")
const second = date.getSeconds().toString().padStart(2, "0")
const fullTime = `${year}-${month}-${day} ${hour}:${minutes}:${second}`
console.log(`[${fullTime}]: ${msg}`);
}