cujojs / poly

Small, fast, awesome. The only ES5-ish set of polyfills (shims) you can mix-and-match because they're individual modules.
Other
139 stars 18 forks source link

Date polyfill wipes out other changes to Date #11

Closed jeffrose closed 11 years ago

jeffrose commented 11 years ago

First, let me admit that aside from polyfill, code should not modifying the Date data type; however we cannot always choose the standards to which 3rd-party products implement their features.

Having said that, due the fact that date.js makes a copy of the Date data type, modifies it, and then sets Date to that modified copy, it wipes out any changes that are made to Date in the interim. This seems to go against the concept of "do no harm."

unscriptable commented 11 years ago

fair point. let me take another look at that shim.

unscriptable commented 11 years ago

this fix was finally released in 0.5.2