setData (v) {
if (v.substring(4, 5) == '0' && v.substring(6, 7) == '0') {
return `${v.substring(0, 4)}年${v.substring(5, 6)}月${v.substring(7, 8)}日`
} else if (v.substring(4, 5) == '0' && v.substring(6, 7) !== '0') {
return `${v.substring(0, 4)}年${v.substring(5, 6)}月${v.substring(6, 8)}日`
} else if (v.substring(4, 6) !== '0' && v.substring(6, 7) == '0') {
return `${v.substring(0, 4)}年${v.substring(4, 6)}月${v.substring(7, 8)}日`
} else {
return `${v.substring(0, 4)}年${v.substring(4, 6)}月${v.substring(6, 8)}日`
}
},
字符串日期加上年月日
最新推荐文章于 2024-03-24 14:41:24 发布