以JAVA为例:
/**
* 判断给定时间在否在给定两个时间之间
*/
public static void do7(String star,String end){
SimpleDateFormat localTime=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try{
Date sdate = localTime.parse(star);
Date edate=localTime.parse(end);
long time = System.currentTimeMillis();
System.out.println(time+"##"+sdate.getTime()+"##"+edate.getTime());
if(time>=sdate.getTime()&& time<=edate.getTime()){
System.out.println("true");
}
}catch(Exception e){}
}