Java Calendar Day isSameDay(Calendar dayOne, Calendar dayTwo)

Here you can find the source of isSameDay(Calendar dayOne, Calendar dayTwo)

Description

is Same Day

License

Open Source License

Declaration

public static boolean isSameDay(Calendar dayOne, Calendar dayTwo) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.Calendar;

public class Main {
    public static boolean isSameDay(Calendar dayOne, Calendar dayTwo) {
        return ((dayOne.get(Calendar.DAY_OF_MONTH) == dayTwo.get(Calendar.DAY_OF_MONTH))
                && (dayOne.get(Calendar.MONTH) == dayTwo.get(Calendar.MONTH))
                && (dayOne.get(Calendar.YEAR) == dayTwo.get(Calendar.YEAR)));
    }/*from w  w  w.  j a v  a  2  s  . co m*/
}

Related

  1. isSameDay(Calendar cal1, Calendar cal2)
  2. isSameDay(Calendar cal1, Calendar cal2)
  3. isSameDay(Calendar cal1, Calendar cal2)
  4. isSameDay(Calendar cal1, Calendar cal2)
  5. isSameDay(Calendar day1, Calendar day2)
  6. isSameDay(Calendar today, Date now)
  7. isSameDay(final Calendar cal1, final Calendar cal2)
  8. isSameDay(final Calendar date1, final Calendar date2)
  9. isSunday(GregorianCalendar date)