Here you can find the source of isSameInstant(final Calendar cal1, final Calendar cal2)
public static boolean isSameInstant(final Calendar cal1, final Calendar cal2)
//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(); } }