Java Calendar Second dateEquals(Calendar calendarFirst, Calendar calendarSecond)

Here you can find the source of dateEquals(Calendar calendarFirst, Calendar calendarSecond)

Description

date Equals

License

Open Source License

Declaration

public static Boolean dateEquals(Calendar calendarFirst, Calendar calendarSecond) 

Method Source Code

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

import java.util.Calendar;

public class Main {
    public static Boolean dateEquals(Calendar calendarFirst, Calendar calendarSecond) {

        if (calendarFirst.get(Calendar.YEAR) == calendarSecond.get(Calendar.YEAR))
            if (calendarFirst.get(Calendar.MONTH) == calendarSecond.get(Calendar.MONTH))
                if (calendarFirst.get(Calendar.DAY_OF_MONTH) == calendarSecond.get(Calendar.DAY_OF_MONTH))
                    return true;

        return false;

    }/*from  w  w  w  .  j a  v a2  s . c  o m*/
}

Related

  1. after(final Calendar first, final Calendar second)
  2. clearCalendarSecondWithRear(Calendar cal)
  3. getSecond(Calendar calendar)
  4. getSecondsSinceMidnight(Calendar c)
  5. getSecondsSinceMidnight(final Calendar time)
  6. getTimeInSeconds(Calendar t)