84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
new Date("2013-03-18 12:12:12"),ios系统得到的为Invalid Date,这是为什么?应该怎么处理?
new Date("2013-03-18 12:12:12")
Invalid Date
认证0级讲师
The content you want to restore from the network disk
格式问题,不仅ios会说invalid,你在windows下也是一样的。
建议修改如下 someTime=new Date("2013-03-18T12:12:12"); 或者 anotherTime=new Date(2013,03,18,12,12,12);
注意月份中,实际是4月份哦,因为月份是从0开始的
"2013-03-18 12:12:12".replace(/-/g, "/");
你再试试。
这个是IOS的bug,安卓下面可以用 new Date("2013/03/18 12: 12: 12")和new Date("2013-03-18 12: 12: 12")但是IOS只能用new Date("2013/03/18 12 :12 :12")
The content you want to restore from the network disk
格式问题,不仅ios会说invalid,你在windows下也是一样的。
注意月份中,实际是4月份哦,因为月份是从0开始的
你再试试。
这个是IOS的bug,
安卓下面可以用 new Date("2013/03/18 12: 12: 12")和new Date("2013-03-18 12: 12: 12")
但是IOS只能用new Date("2013/03/18 12 :12 :12")