I am trying to get the script to display yesterdays date in "m/d/yy" format. When I use this code:
<p>
    Here is the report for 
    <script>
        var yesterday = new Date();
        yesterday.setDate(yesterday.getDate() - 1);
        document.write(yesterday.format("m/d/yy"));
    </script>
    .
</p>
this is returned:
Here is the comparison report for .
if I put it in without the .format("m/d/yy"), I get this:
Here is the comparison report for Thu Mar 27 2014 15:42:31 GMT-0700 (Pacific Daylight Time) .
What am I doing wrong?
 
    