app/src/main/java/id/rainey/master/utils/LDateFormat.java
// Get time range from today to a future date in day format
Get time range from today to a future date in day format
Get time range from today to a future date in day format
public static long timeRangeFromTodayInDay(String endDate) {
        Date d1 = getDateObject(currentDateAndTime(), "yyyy-MM-dd");
        Date d2 = getDateObject(endDate, "yyyy-MM-dd");
        long diff = d2.getTime() - d1.getTime();
        long diffDays = diff / (24 * 60 * 60 * 1000);
        return diffDays;
    }
public static long timeRangeFromTodayInDay ( String endDate ) { Date d1 = getDateObject ( currentDateAndTime ( ) , "yyyy-MM-dd" ) ; Date d2 = getDateObject ( endDate , "yyyy-MM-dd" ) ; long diff = d2 . getTime ( ) - d1 . getTime ( ) ; long diffDays = diff / ( 24 * 60 * 60 * 1000 ) ; return diffDays ; }
Get time range from today to a future date in day format
Get time range from today to a future date in day format
//in milliseconds