title: How to test if a Date object is equal to a specific date
body: <p>What's the <strong>best</strong> (clearest, shortest, fastest, etc.) way to determine whether a <code>Date</code> object is equal to, say, July 4, 2012?</p>
  
  <p>For example, this works but is rather verbose:</p>
  
  <pre><code>if (date.getFullYear() === 2012 &amp;&amp; date.getMonth() + 1 === 7 &amp;&amp; date.getDate() === 4)
  </code></pre>
  
  <p>Is there a more elegant solution?</p>
  
  <p>(In my actual scenario, server-side code will be plugging in the specific date to test against. Also, the <code>date</code> comes from a jQuery UI datepicker and so will have a time component of 00:00:00.)</p>