Cannot find function getMonth in Object 05/06/11
<p>Why do i get this error, when i format my date? Code follows below</p>

<pre><code>var date = /Date(1306348200000)/

function dateToString(date) {
    return (date.getMonth() + 1) + '/' + date.getDate() + '/' + date.getYear();
}

function dateFromString(str) {
    return new Date(str);
}
</code></pre>
