title: Comparing two dates with a given format
body: <p>I am trying to compare two dates using javascript with ExtJS 4.</p>
  
  <pre><code>var d= Ext.Date.parse("03/21/2012", "m/d/Y");
  var comp= new Date();
  
  if (d&lt; comp) {
      console.log("date value provided is larger" );
  } else {
      console.log("date value provided is less" );
  }
  </code></pre>
  
  <p>When running the above example, the result I get is "date value provided is less". However, when I change the value of <code>d</code> to a future date <code>12/21/2012</code>, I still get the message "date value provided is less".</p>
  
  <p>I think this is because I need to format the <code>var comp= new Date();</code> value so it can do the calculation.</p>
  
  <p>How can I do that?</p>