ios不支持`new Date('xxxx-xx-xx')`

137 阅读1分钟

ios不支持new Date('xxxx-xx-xx'),转换时间对象失败

解决

new Date("2018-06-14 00:00:00".replace(/-/g,'/')).getTime()\