This only took a couple of min. to track down, so ignore the other members’ non-answers. They shouldn’t get points for that.
There seems to be a bug in Opera (might be fixed in 9.5) when using the Date constructor with 0:
<pre>var lastDate = new Date(String(monthNum+1)+”/0/”+String(yearNum));</pre>
In FF and IE this sets the date to the last day of the month, but in Opera it set the date to the next day, which is why it stops iteration after 2.
It looks like you can fix this by replacing the instances of the above statement with this:
<pre>var lastDate = new Date(String(monthNum+1)+”/1/”+String(yearNum));
lastDate.setDate(0);</pre>
Apparently the setDate method in Opera works fine with 0.
Discuss This Question: 1  Reply