task#13769,时间格式
This commit is contained in:
@ -5,8 +5,9 @@ const formatDate = date => {
|
||||
const day = tempDate.getDate()
|
||||
return `${[year, month, day].map(formatNumber).join('-')}`
|
||||
}
|
||||
const formatDate1 = () => {
|
||||
let tempDate = new Date()
|
||||
const formatDate1 = date => {
|
||||
let value=date.replace(/\./g, '/')
|
||||
let tempDate = new Date(value)
|
||||
const year = tempDate.getFullYear()
|
||||
const month = tempDate.getMonth() + 1
|
||||
const day = tempDate.getDate()
|
||||
|
Reference in New Issue
Block a user