Android examples for java.util:Date Compare
compare two Date value
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static SimpleDateFormat chineseDateFormat = new SimpleDateFormat( "yyyy?MM?dd?"); public static boolean compare(Date compareDate, Date currentDate) { return chineseDateFormat.format(compareDate).compareTo( chineseDateFormat.format(currentDate)) >= 0; }/* www. j a v a 2 s . co m*/ }