IOS真机上new Date()时间格式问题,Bug?
console.log( 'new Date("2016-12-29") =' , new Date( "2016-12-29" )); console.log( 'new Date("2016.12.29") =' , new Date( "2016.12.29" )); console.log( 'new Date("2016-12-29 18:00") =' , new Date( "2016-12-29 18:00" )); console.log( 'new Date("2016-12-29 18:00:00") =' , new Date( "2016-12-29 18:00:00" )); |
打印结果:
取时间格式的几种写法,发现不能设时分秒,有什么办法可以破?