Initialize mini programs configuration

This commit is contained in:
2021-11-25 16:11:29 +08:00
parent 3911dd73f0
commit 9ba3274072
13 changed files with 69 additions and 184 deletions
-19
View File
@@ -1,19 +0,0 @@
export const formatTime = (date: Date) => {
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
const hour = date.getHours()
const minute = date.getMinutes()
const second = date.getSeconds()
return (
[year, month, day].map(formatNumber).join('/') +
' ' +
[hour, minute, second].map(formatNumber).join(':')
)
}
const formatNumber = (n: number) => {
const s = n.toString()
return s[1] ? s : '0' + s
}