public static long getEpochMillisecond(Date date) {
        long epochDay = date.toLocalDate().toEpochDay();
        return epochDay * MILLIS_PER_DAY;
    }
The number of days from year zero to year 1970.
There are five 400 year cycles from year zero to 2000.
There are 7 leap years from 1970 to 2000.
indexr-common/src/main/java/io/indexr/util/DateTimeUtil.java