Here is my code
boolean isWithinRange(String d)
{
boolean withinDate = false;
try
{
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
Date date = dateFormat.parse(d);
withinDate = !(date.before(startDate) || date.after(endDate));
}
catch (ParseException parseException)
{
}
return withinDate;
}
Inputs
2015-11-26
2015-11-26 - Copy
Both returning true but what i required is "2015-11-26" should be true and "2015-11-26 - Copy" should be false.