Year month date check method update

updated year month date check. Only check the month when current year is equal to input year. same with date checking.