public static boolean isSameDay(Date date1, Date date2) {
        Calendar cal1 = Calendar.getInstance();
        Calendar cal2 = Calendar.getInstance();
        cal1.setTime(date1);
        cal2.setTime(date2);
        return cal1.get(Calendar.DAY_OF_YEAR) == cal2.get(Calendar.DAY_OF_YEAR) &&
                cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR);
    }
Created by Nick@NewStand.org on 2017/3/26 17:00
E-Mail: NewStand@163.com
All right reserved.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/DateUtils.java