//判斷年份year是否爲閏年,是閏年則返回true,不然返回false function isLeapYear(year){ var a = year % 4; var b = year % 100; var c = year % 400; if( ( (a == 0) && (b != 0) ) || (c == 0) ){ return true; } return false; }