title: parseInt("08") returns 0
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/850341/workarounds-for-javascript-parseint-octal-bug">Workarounds for JavaScript parseInt octal bug</a>  </p>
  </blockquote>
  
  
  
  <p>I've been working on a javascript function, setting date objects by declaring the year, month &amp; date. However, when the month has a value of <code>08</code> or <code>09</code>, <code>0</code> is returned when using <code>parseInt()</code>. See below:</p>
  
  <pre><code>parseInt("01") //returns 1
  parseInt("02") //returns 2
  parseInt("03") //returns 3
  parseInt("04") //returns 4
  parseInt("05") //returns 5
  parseInt("06") //returns 6
  parseInt("07") //returns 7
  parseInt("08") //returns 0?
  parseInt("09") //returns 0?
  parseInt("10") //returns 10
  </code></pre>
  
  <p>I've created a jsFiddle to demonstrate this issue:</p>
  
  <p><a href="http://jsfiddle.net/GhkEf/" rel="noreferrer">http://jsfiddle.net/GhkEf/</a></p>
  
  <p>Why does <code>parseInt("08")</code> and <code>parseInt("09")</code> return <code>0</code>?</p>