project init

This commit is contained in:
2023-01-28 14:37:45 +08:00
parent fa1176f658
commit 3a134326e7
83 changed files with 1482 additions and 140 deletions

View File

@@ -6,7 +6,14 @@ const formatTime = date => {
const minute = date.getMinutes()
const second = date.getSeconds()
return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}`
return `${[year, month, day].map(formatNumber).join('-')} ${[hour, minute, second].map(formatNumber).join(':')}`
}
const formatDate = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
return `${[year, month, day].map(formatNumber).join('-')}`
}
const formatNumber = n => {
@@ -15,5 +22,6 @@ const formatNumber = n => {
}
module.exports = {
formatTime
formatTime,
formatDate
}