首页 > 代码库 > 按月匹配天数

按月匹配天数

if(monthValue=http://www.mamicode.com/=1||monthValue==3||monthValue==5||monthValue==7||monthValue==8||monthValue==10||monthValue==12) {
                dayvalue = http://www.mamicode.com/31
            }else if(monthValue=http://www.mamicode.com/=4||monthValue==6||monthValue==11||monthValue==9) {
                dayvalue = http://www.mamicode.com/30
            }else if(monthValue=http://www.mamicode.com/=2){

                if(yearValue%4==0 && (yearValue%4 !=0 || yearValue%400==0)){ //闰年
                    dayvalue = http://www.mamicode.com/29
                }else{
                    dayvalue = http://www.mamicode.com/28
                }

            }

按月匹配天数