You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried to create dates from string using new Date() constructor and it behaves differently in debug mode than in standard mode. For example, in debug mode I can create a date using const date = new Date("2017-10-09 12:00:00")
In standard mode (without debug js remotely) I get Invalid Date in my const.
Looks like the constructor accepts more formats in debug.
The text was updated successfully, but these errors were encountered:
Hi, by debug mode you probably mean remote debugging in Chrome? There are differences between the JS engines that are used by the simulator/device (JavaScriptCore) and by Chrome (V8). You can check the answer in this StackOverflow question. Another thing that I noticed is that you have one extra single quote there which would cause a syntax error:
const date = new Date("2017-10-09 12:00:00"'); // single quote after a closing double quote
I've tried to create dates from string using new Date() constructor and it behaves differently in debug mode than in standard mode. For example, in debug mode I can create a date using
const date = new Date("2017-10-09 12:00:00")
In standard mode (without debug js remotely) I get
Invalid Date
in my const.Looks like the constructor accepts more formats in debug.
The text was updated successfully, but these errors were encountered: