daysOfMonth
2008/05/01 08:50
Viewed 2255 times
Replies: 0/0

Hi,
we have other Calendar system in my country and so i changed something in code as following :
Date._MD = new Array(31,31,31,31,31,31,30,30,30,30,30,29);//<--

** Constants used for time computations *
Date.SECOND = 1000 /* milliseconds */;
Date.MINUTE = 60 * Date.SECOND;
Date.HOUR = 60 * Date.MINUTE;
Date.DAY = 24 * Date.HOUR;
Date.WEEK = 7 * Date.DAY;

** Returns the number of days in the current month *
Date.prototype.getMonthDays = function(month) {
var year = this.getFullYear();
if (typeof month == "undefined") {
month = this.getMonth();
}
if (((0 == ((year+1)%4)) && ( (0 != ((year+1)%100)) || (0 == ((year+1)%400)))) && month == 11) {
return 30;
} else {
return Date._MD[month];
}
};

// but it has no effect.
can any body help?

Google