while hacking a neat little javascript i ran into, what i consider, a really weird bug. The script runs fine in IE, camino, netscape en mozilla.
I wonder whether it is something with my installation of safari, because i really can't believe this came thru the beta testing... maybe one of you can verify for me?
-- begin --
var i=0;
for(i=1;i<365;i++) {
var effe = new Date(2003,0,i);
document.write(i + ": " + effe.getDate() + "/" + (effe.getMonth()+1) + "<br>");
}
-- end --
Hope i didn't make any typo's, but above simply should print a list of dates (european: day/month) Look what happens at 7/5 (7th may). I get:
126: 6/5
127: 7/5
128: 25/8
129: 26/8
it jump's over 3 months!!
and then:
255: 30/12
256: 31/12
257: 1/1
258: 2/1
see how it thinks the year is over at 256 (what a telltale number, huh? (and for that matter: so is 127)
anyone?