Java Calendar Compare isSameInstant(final Calendar cal1, final Calendar cal2)

Here you can find the source of isSameInstant(final Calendar cal1, final Calendar cal2)

Description

is Same Instant

License

Apache License

Declaration

public static boolean isSameInstant(final Calendar cal1, final Calendar cal2) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Calendar;
import java.util.Date;

public class Main {
    public static boolean isSameInstant(final Date date1, final Date date2) {
        return date1.getTime() == date2.getTime();
    }// w  ww.j  av a2 s. c om

    public static boolean isSameInstant(final Calendar cal1, final Calendar cal2) {
        return cal1.getTime().getTime() == cal2.getTime().getTime();
    }
}

Related

  1. isSameDate(Calendar d1, Calendar d2)
  2. isSameDate(java.util.Calendar date1, java.util.Calendar date2)
  3. isSameInstant(Calendar cal1, Calendar cal2)
  4. isSameInstant(Calendar cal1, Calendar cal2)
  5. isSameInstant(Calendar cal1, Calendar cal2)
  6. max(Calendar cal1, Calendar cal2)
  7. min(Calendar c1, Calendar c2)
  8. min(final Calendar... calendars)
  9. minCalendars(List calendars)