title: Invalid Date for a new Date("YYYY-MM-DDThh:mm:ss"); instanciation
body: <p>I'm working with titanium which is a framework for mobile developpement based on javascript.</p>
  
  <p>I've an array which contains among its cells a string representing a 'date and time' string in the 'YYYY-MM-DD HH:mm:ss' format ( NightsArray[i][3] returns : 2014-02-20 23:00:00) as shown in the console later. </p>
  
  <p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date" rel="nofollow">in this page</a> it's shown several constructors for the Date() object with several parameters :</p>
  
  <pre><code>var today = new Date();
  var birthday = new Date("December 17, 1995 03:24:00");
  var birthday = new Date("1995-12-17T03:24:00");
  var birthday = new Date(1995,11,17);
  var birthday = new Date(1995,11,17,3,24,0);
  </code></pre>
  
  <p>So as you can see the closest constructor for my array's string is the 3th one :</p>
  
  <pre><code>var birthday = new Date("1995-12-17T03:24:00");
  </code></pre>
  
  <p>In the following code i will try to format my string in the "YYYY-MM-DDThh:mm:ss" form with some substr() methods and pass the resulting string (after a concatenation) to the Date() constructor but i got 'Invalid Date' as shown in the console log.</p>
  
  <pre><code>        Ti.API.error("+*///+++NIGHT DATE &amp; TIME(string) : "+NightsArray[i][3]);
          Ti.API.error("+*///+++NIGHT DATE &amp; TIME(string)substr(0,10) : "+NightsArray[i][3].substr(0,10));
          Ti.API.error("+*///+++NIGHT DATE &amp; TIME(string)substr(11,10) : "+NightsArray[i][3].substr(11,10));
  
          Ti.API.error("+*///+++"+NightsArray[i][3].substr(0,10)+"T"+NightsArray[i][3].substr(11,10));
  
          var nightDateNTime =  new Date(NightsArray[i][3].substr(0,10)+"T"+NightsArray[i][3].substr(11,10));
          Ti.API.error("+*///+++ CURRENT DATE nightDateNTime(Date): "+nightDateNTime);
          var d = new Date();
          Ti.API.error("+*///+++ CURRENT DATE : "+d);
  </code></pre>
  
  <p>This is the console log : </p>
  
  <pre><code>[ERROR] :+*///+++NIGHT DATE &amp; TIME(string) : 2014-02-19 23:00:00
  [ERROR] :  +*///+++NIGHT DATE &amp; TIME(string)substr(0,10) : 2014-02-19
  [ERROR] :  +*///+++NIGHT DATE &amp; TIME(string)substr(11,10) : 23:00:00
  [ERROR] :  +*///+++2014-02-19T23:00:00
  [ERROR] :  +*///+++ CURRENT DATE nightDateNTime(Date): Invalid Date
  [ERROR] :  +*///+++ CURRENT DATE : Mon Feb 17 2014 11:09:09 GMT+0100 (CET)
  </code></pre>
  
  <p>i have to compare that string to the current date at the end but now i first have to convert that string into a date but i wonder why this doesn't work..</p>