You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
335 B
13 lines
335 B
1 year ago
|
// 2019年1月22日
|
||
|
function formatYYMMDDDate(date_str) {
|
||
|
date_str = date_str.replace(/-/g, '/')
|
||
|
let date = new Date(Date.parse(date_str))
|
||
|
console.log(date)
|
||
|
let year = date.getFullYear()
|
||
|
let month = date.getMonth() + 1
|
||
|
let day = date.getDate()
|
||
|
return `${year}年${month}月${day}`
|
||
|
}
|
||
|
export default {
|
||
|
formatYYMMDDDate
|
||
|
}
|