We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
用了非标准的时间字符串去 new Date(), 类似 '2019-04-24'
new Date()
'2019-04-24'
在 Chrome 中是没有问题的, 但是 Safari 中不行, 其它浏览器未测试
应该使用标准的时间格式, 包括:
let time = '2019-04-24'; time = time.replace(/-/g, '/'); let date = new Date(time);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题原因
用了非标准的时间字符串去
new Date()
, 类似'2019-04-24'
在 Chrome 中是没有问题的, 但是 Safari 中不行, 其它浏览器未测试
如何避免问题
应该使用标准的时间格式, 包括:
非标准时间转换
The text was updated successfully, but these errors were encountered: