I need to filter a date from the "From date" to the "To date" using the "Current date" filter.
Here is the code I use in my java application:
String from = "19/05/1991";
String cmp = "23/05/1991";
String to = "23/12/2015";
if (from.compareTo(cmp) <= 0 && to.compareTo(cmp) >= 0) {
System.out.println("Date lies between from and to date");
}
Is this code correct?