Android Day Compare isDateDayEqual(long lTime1, long lTime2)

Here you can find the source of isDateDayEqual(long lTime1, long lTime2)

Description

is Date Day Equal

Declaration

public static boolean isDateDayEqual(long lTime1, long lTime2) 

Method Source Code

//package com.java2s;
import java.util.Calendar;

public class Main {
    public static boolean isDateDayEqual(long lTime1, long lTime2) {
        Calendar cal1 = Calendar.getInstance();
        cal1.setTimeInMillis(lTime1);//ww w  .  j  a v  a 2 s . co m
        Calendar cal2 = Calendar.getInstance();
        cal2.setTimeInMillis(lTime2);

        return cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR)
                && cal1.get(Calendar.DAY_OF_YEAR) == cal2
                        .get(Calendar.DAY_OF_YEAR);
    }
}

Related

  1. isSameDay(Date date1, Date date2)
  2. isSameDay(Calendar cal1, Calendar cal2)
  3. daysSince(long date)
  4. getDaysAgo(String fromDay, int toOlderDay, int toOlderDayMonth)
  5. isDayChanged(long lastScan)