2000年4月30日星期日

JSで閏年の判定

// 閏年の判定
function checkLeapYear(year) 
{
 return (year % 4 == 0 && year % 100 != 0) || year % 400 == 0;
}

没有评论:

发表评论