title: Convert Returned String (YYYYMMDD) to Date
body: <p>I have a string that contains 8 digits that represent a date. For example:</p>
  
  <pre><code>20120515
  </code></pre>
  
  <p>I'd like to compare it with today's date, created in this manner:</p>
  
  <pre><code>var currentDate = new Date();
  </code></pre>
  
  <p>How can I convert the "8 digit date string" to a suitable date format in order to compare it to currentDate?</p>