Java Calendar Day isSameDay(Calendar c1, Calendar c2)

Here you can find the source of isSameDay(Calendar c1, Calendar c2)

Description

is Same Day

License

Open Source License

Parameter

Parameter Description
c1 a parameter
c2 a parameter

Declaration

public static boolean isSameDay(Calendar c1, Calendar c2) 

Method Source Code

//package com.java2s;

import java.util.Calendar;

public class Main {
    /**//from www.j a  va 2  s  .c  o m
     * 
     * @param c1
     * @param c2
     * @return
     */
    public static boolean isSameDay(Calendar c1, Calendar c2) {
        return c1.get(Calendar.YEAR) == c2.get(Calendar.YEAR) && c1.get(Calendar.MONTH) == c2.get(Calendar.MONTH)
                && c1.get(Calendar.DAY_OF_MONTH) == c2.get(Calendar.DAY_OF_MONTH);
    }
}

Related

  1. isDayAfter(Calendar calendar, Calendar baseCalendar)
  2. isDSTChangeDay(Calendar cal)
  3. isEndOfDay(Calendar calendar)
  4. isHolyday(Calendar c)
  5. isRestDay(Calendar cal)
  6. isSameDay(Calendar cal1, Calendar cal2)
  7. isSameDay(Calendar cal1, Calendar cal2)
  8. isSameDay(Calendar cal1, Calendar cal2)
  9. isSameDay(Calendar cal1, Calendar cal2)