import java.text.SimpleDateFormat;
import java.util.Date;
class Main{
public static int compareToDay(Date date1, Date date2) {
if (date1 == null || date2 == null) {
return 0;
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
return sdf.format(date1).compareTo(sdf.format(date2));
}
}