SoFunction
Updated on 2025-04-10

Solve the problem of NaN in Apple iOS using JS Date

ios uses the following method to obtain NaN, and Android phones are calculated normally. The solution is to change the format of this time

new Date("2017-04-28 23:59:59").getTime()

It would be normal to change it to the following method, that is, to change it to ‘-’ to ‘/’

new Date("2017/04/28 23:59:59").getTime()

The above article solves the problem of NaN in Apple iOS using JS Date() is all the content I share with you. I hope it can give you a reference and I hope you support me more.