ios不兼容 时间 new Date(‘xxxx-xx-xx xx:xx:xx‘) 解决方案

127 阅读1分钟
//ios 不兼容2022-04-08 12:09:10这种格式通过new Date()进行转换,需要正则转化成(2022/04/08 12:09:10)这种格式。
new Date("2022-04-08 12:09:10".replace(/-/g, "/"));