Authored by wenjiekong

添加JS

... ... @@ -41,8 +41,7 @@ var date = {
dayNum = 31;
var select,
i,
isYearFour;
i;
year = parseInt(year, 10);
month = parseInt(month, 10);
... ... @@ -65,8 +64,7 @@ var date = {
dayNum = 30;
} else if (month === 2) {
dayNum = 28;
isYearFour = (year % 4) === 0;
if (isYearFour && (year % 100 !== 0 || year % 400 === 0)) {
if ((year % 4) === 0 && (year % 100 !== 0 || year % 400 === 0)) {
dayNum = 29;
}
}
... ...