done: 第一版demo
This commit is contained in:
commit
0853ecfa24
8 files changed
+305
No files matched your search
@@ -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}`);
|
||||
}
|
||||
Reference in new issue
Block a user