function getMonthLength(month,year) {
var monthlength = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
if (month==1 && (year/4==Math.floor(year/4) ||
year/400==Math.floor(year/400)))
{
return 29;
}
else return monthlength[month];
}
Tuesday, 12 June 2007
getMonthLength()
I use this function everytime i am working with some type of time handling or validation.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment