Formatting a Date String in React Native : <p>I'm trying to format a Date String in React Native.</p>

<p>Ex: 2016-01-04 10:34:23</p>

<p>Following is the code I'm using.</p>

<pre><code>var date = new Date("2016-01-04 10:34:23");
console.log(date);
</code></pre>

<p>My problem is, when I'm emulating this on a iPhone 6S, it'll print Mon <code>Jan 04 2016 10:34:23 GMT+0530 (IST)</code> without any problem. But if I try with the iPhone 5S it prints nothing. And if you try to get the month by using a method like <code>date.getMonth()</code> it'll print <code>"NaN"</code>.</p>

<p>Why is this? What is the workaround?</p>
