functionstuCardIdCanApplyByAge(cardId){var birthYear = cardId.substring(6,10);
var birthMonth = cardId.substring(10,12);
var birthDay = cardId.substring(12,14);
var now = newDate();
var year = now.getFullYear();
var month = now.getMonth() +1;
var day = now.getDate();
var age = year - birthYear;
if(age>18){
returntrue;
}else{
if(age<18){
returnfalse;
}else{
if(birthMonth>month){
returnfalse;
}elseif(birthMonth<month){
returntrue;
}else{
if(birthDay<=day){
returntrue;
}else{
returnfalse;
}
}
}
}
}