Tom - 2008-11-23

I just stumbled onto the same thing. I wish the Date object wasn't exploited that way. This really has a negative impact on the rest of my project. How did you workaround it? I did this:

Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
Date.prototype.setFullYear = function(y, month, day) {
var d = new Date(this);
d.__msh_oldSetFullYear(y, month, day);
if (d.getMonth() != this.getMonth())
this.setDate(28);
this.__msh_oldSetFullYear(y, month, day);
};