自带的函数也运行不了?
- 当前 Bug 的表现(可附上截图)
- 预期表现
Year:2019
- 复现路径
- 提供一个最简复现 Demo
function addYear(sdate, syear) {
console.log(‘curDate:’ + sdate)
var year = sdate.getFullYear()
console.log(‘Year:’ + year)
var month = sdate.getMonth() + 1
var day = sdate.getDate()
var hour = sdate.getHours()
var minute = sdate.getMinutes()
var second = sdate.getSeconds()
return [year, month, day].map(formatNumber).join(’/’) + ’ ’ + [hour, minute, second].map(formatNumber).join(’:’)
}