@Restricted(NoExternalUse.class)
    public static long daysBetween(@NonNull Date a, @NonNull Date b) {
        LocalDate aLocal = a.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
        LocalDate bLocal = b.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
        return ChronoUnit.DAYS.between(aLocal, bLocal);
    }
@Test
    public void testDifferenceDays() throws Exception {
        Date may_6_10am = parseDate("2018-05-06 10:00:00");
        Date may_6_11pm55 = parseDate("2018-05-06 23:55:00");
        Date may_7_01am = parseDate("2018-05-07 01:00:00");
        Date may_7_11pm = parseDate("2018-05-07 11:00:00");
        Date may_8_08am = parseDate("2018-05-08 08:00:00");
        Date june_3_08am = parseDate("2018-06-03 08:00:00");
        Date june_9_08am = parseDate("2018-06-09 08:00:00");
        Date june_9_08am_nextYear = parseDate("2019-06-09 08:00:00");

        assertEquals(0, Util.daysBetween(may_6_10am, may_6_11pm55));
        assertEquals(1, Util.daysBetween(may_6_10am, may_7_01am));
        assertEquals(1, Util.daysBetween(may_6_11pm55, may_7_01am));
        assertEquals(2, Util.daysBetween(may_6_10am, may_8_08am));
        assertEquals(1, Util.daysBetween(may_7_11pm, may_8_08am));

        // larger scale
        assertEquals(28, Util.daysBetween(may_6_10am, june_3_08am));
        assertEquals(34, Util.daysBetween(may_6_10am, june_9_08am));
        assertEquals(365 + 34, Util.daysBetween(may_6_10am, june_9_08am_nextYear));

        // reverse order
        assertEquals(-1, Util.daysBetween(may_8_08am, may_7_11pm));
    }