[Solved] how do I compare current date with date which is entered by the user? [closed]


You need the basic date comparion between current date and input date given by the user right?
Do it like this:

Calendar userDate = Calendar.getInstance();
Calendar currentDate = Calendar.getInstance();
userDate.setTime(inputDate);//here inputDate is date given by the user.

if(!userDate.before(currentDate)) {
    // user date is after current date(today).
} else {
    // user date is before current date(today).
}

1

solved how do I compare current date with date which is entered by the user? [closed]