react native 关于两种引擎引出问题
2019-09-30 本文已影响0人
glenlg
date 函数在移动和电脑端两个引擎下表现差异,使结果展现不一致.
问题表现:正常运行与remote debug下分别表现出两个结果.
e.g. : 移动 new Date('11/07')=>null
电脑: new Date('11/07')=>Sun Nov 04 2001 00:00:00 GMT+0800
解决:用标准的时间格式new Date('11-07')
date 函数在移动和电脑端两个引擎下表现差异,使结果展现不一致.
问题表现:正常运行与remote debug下分别表现出两个结果.
e.g. : 移动 new Date('11/07')=>null
电脑: new Date('11/07')=>Sun Nov 04 2001 00:00:00 GMT+0800
解决:用标准的时间格式new Date('11-07')