i already tried to compareTo two date in android studio like this
String dtThen = "13-10-2013";
Date dateThen = formatter.parse(dtThen);
String dtNow = "15-10-2013";
Date dateNow = formatter.parse(dtNow);
if (dateThen.compareTo(dateNow)==0) {
Log.d("if different date is 0");
} else if (dateThen.compareTo(dateNow)==1) {
Log.d("if different date is 1");
} else if (dateThen.compareTo(dateNow)>1) {
Log.d("if different date is 2");
}
in my code are three condition, i want make condition compare date is 0 , 1 and greater than 1
and if compareTo is 0 is work, but how to make compareTo same with 1 and greater than 1
how ??