title: Compare day month and year
body: <p>Good afternoon in my timezone.</p>
  
  <p>I want to compare two dates , one of them is inserted by the user and the other is the present day. Snippet of code :</p>
  
  <pre><code>    var dateString = "2012-01-03"
      var date = new Date(dateString);
      date &lt; new Date() ? true : false;
  </code></pre>
  
  <p>This returns true, i think under the hood both Date objects are transformed to milliseconds and then compared , and if it is this way the "Today" object is bigger because of the hours and minutes.So what i want to do is compare dates just by the day month and year.What is the best approach ? Create a new Date object and then reset the hours minutes and milliseconds to zero before the comparison? Or extract the day the month and year from both dates object and make the comparison ? Is there any better approach ?</p>
  
  <p>Thanks in advance
  With the best regards.
  Happy new year </p>