My Javascript code tries to parse some strings into Date instances.
An example string would be '2016-04-06 00:00:00 -0400')
.
Now here's where behaviour starts to differ between browsers:
In Chrome 49, new Date('2016-04-06 00:00:00 -0400')
returns the correct Date object.
However in Firefox 45, the same code return Invalid Date
.
Why does this difference exist, and how do I parse this sting consistently across browsers?