I'm trying to compare two dates stored in calendar objects. At the time of seeing if they are equal or minor, or not, I have no problem, the difficulty arises when some of those calendar objects have a date and time stored, and others do not. What I would like to know is if there is a way to verify if 2 calendars have the same date without taking into account the time
I have this code:
Calendar cal = Calendar.getInstance();
cal.set(2018, 1, 28, 7, 4, 0);
if(cal.equals(Calendar.getInstance())){
System.out.println("hoy");
}