Why isn't my date parsing correctly?
<p>I'm having issues parsing dates after 01/01/2000.  The results are being returned incorrectly.  1999 is getting parsed as the year 1999, when it gets to 2000 it is parsing it as 0100, and then 2001 as 0101, etc.  Here is the test code to illustrate this issue:</p>

<pre><code>&lt;script type="text/javascript" language="javascript"&gt;


// functions incorrect  changes year from 2010 to 0101
var d = (new Date("12/01/2009"));
if (d.getMonth() &lt; 11) 
 { d = new Date(d.getYear(), d.getMonth() + 1, 1); } 
 else
 { d = new Date(d.getYear() + 1, 0, 1); } 
document.write(d);
//  Result:  Sat Jan 01 0101 00:00:00 GMT-0500 (Eastern Standard Time) 

document.write('&lt;br /&gt;');


document.write(Date.parse(Date()) &lt; Date.parse(d));
// 
// Result: false  today should definitely be &lt; 01/01/2010


document.write('&lt;br /&gt;');


// Functions correctly if year is before 2000

var d = (new Date("12/01/1998"));

if (d.getMonth() &lt; 11) 
 { d = new Date(d.getYear(), d.getMonth() + 1, 1); } 
 else
 { d = new Date(d.getYear() + 1, 0, 1); } 


document.write(d);
//  Result:  Fri Jan 01 1999 00:00:00 GMT-0500 (Eastern Standard Time)  
document.write('&lt;br /&gt;');


document.write(Date.parse(Date()) &lt; Date.parse(d));
// false


&lt;/script&gt;
</code></pre>
