baskar007 / datejs

Automatically exported from code.google.com/p/datejs
Other
0 stars 0 forks source link

Date additions unreliable in Safari 2 #12

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Safari 2's implementation of Date#setDate uses a signed byte integer which
means large values will get 'rolled over' and return an incorrect value
unless the add/subtracts are called in increments. The following link
details this bug which affects the addition methods that use setDate. This
issue does not affect Safari 3.

http://brianary.blogspot.com/2006/03/safari-date-bug.html

I tested using the version installed at http://www.datejs.com/

Original issue reported on code.google.com by cgri...@gmail.com on 28 Nov 2007 at 2:59

GoogleCodeExporter commented 8 years ago
Ya, I've debated adding the Safari 2 fix into the library, but that's a tough 
call to
make. Basically, if you're supporting Safari 2, you may already be working 
around
this issue. The native Safari 2 functions can be overridden with a fix.

I think I might write a blog post about the problem and provide a simple script 
that
will override the native Safari 2 functionality. That way, if you're supporting 
the
Safari 2 platform you can add the script, otherwise we're not adding bloat to 
support
a pretty obvious flaw in just one browser version. 

I would much rather use those bits saved for something else.

As you noted, the problem has been fixed in Safari 3.

Original comment by geoff%co...@gtempaccount.com on 28 Nov 2007 at 3:20