日期格式处理ios处理问题 web5 2021-01-08 107 阅读1分钟 new Date('yyyy-mm-dd') 等-分割的字符在iOS 下无法正确处理,需要将-转成/ const str = '2021-01-09 00:00::00' const ok = str.replace(/-/g, '/'); new Date(ok); 这里备忘一下