JavaScript语言
01 function compareDate(DateOne)
02 {
03 var OneMonth = DateOne.substring(5,DateOne.lastIndexOf ("-"));
04 var OneDay = DateOne.substring(DateOne.length,DateOne.lastIndexOf ("-")+1);
05 var OneYear = DateOne.substring(0,DateOne.indexOf ("-"));
06
07 if (Date.parse(OneMonth+"/"+OneDay+"/"+OneYear) >
08 new Date().getTime())
09 {
10 return true;
11 }
12 else
13 {
14 return false;
15 }
16
17 }