title: Date constructor returns NaN in IE, but works in Firefox and Chrome
body: <p>I'm trying to build a little calendar in JavaScript. I have my dates working great in Firefox and Chrome, but in IE the date functions are returning NaN. </p>
  
  <p>Here is the function :</p>
  
  <pre><code>function buildWeek(dateText){
      var headerDates='';
      var newDate = new Date(dateText);
  
      for(var d=0;d&lt;7;d++){
          headerDates += '&lt;th&gt;' + newDate + '&lt;/th&gt;';
          newDate.setDate(newDate.getDate()+1);
      }                       
  
      jQuery('div#headerDates').html('&lt;table&gt;&lt;tr&gt;'+headerDates+'&lt;/tr&gt;&lt;/table&gt;');
  }
  </code></pre>
  
  <p><code>dateText</code> is the Monday of the current week which is actually set in php in the format of 'm, d, Y', e.g. <code>"02, 01, 2010"</code>.</p>