iphone web 时间 问题
alert(CheckObjTime2('2021-1')) alert(CheckObjTime2('2021-1-1')) alert('好了') var time_obj = '2021-1'; //格式化为三位 var d_001 = time_obj.split('-'); if (d_001.length == 2) { d_001.push('01'); } time_obj = d_001.join('-'); alert(CheckObjTime2(time_obj))
--发现 iphone 不支持 这样的格式 var time = '2021-01-06 00:00:00.000'; //失败
var time = '2021-01-06 00:00:00.000'; //失败 time = '2021-01-06 00:00:00.001'; //失败 time = '2021-01-06 01:01:01.001'; //失败 time = '2021-01-06 01:01:01'; //成功 time = '2021-01-06 01:01:01.123'; //失败 测试 phone 应该 不支持 毫秒级别 alert(CheckObjTime3(time))
alert(time);
time = time.substring(0, time.indexOf('.'));
alert(time)