I accept the attribute from the JSP page and want to compare. Whether the date passed to the servlet is today, tomorrow, or another day. How can I compare this ???
   Date dateToDo = Date.valueOf(request.getParameter("date")); //for example 2019-08-31
    Date today = new Date (System.currentTimeMillis());
    Date tomorrow = new Date (System.currentTimeMillis() + 86400000);
    if(dateToDo.equals(today)){
        System.out.println("Today!");
    } else if (dateToDo.equals(tomorrow)){
        System.out.println("Tomorrow!");
    } else {
        System.out.println("OTHER DAY");
    }
 
     
    