Here you can find the source of sameTime(Calendar one, Calendar two)
Parameter | Description |
---|---|
one | The one calendar. |
two | The other calendar. |
public static boolean sameTime(Calendar one, Calendar two)
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { /**//from ww w. j a v a2s . c o m * Returns <tt>true</tt> if the two given calendars are dated on the same time. The difference * from <tt>one.equals(two)</tt> is that this method does not respect the time zone. * @param one The one calendar. * @param two The other calendar. * @return True if the two given calendars are dated on the same time. */ public static boolean sameTime(Calendar one, Calendar two) { return one.getTimeInMillis() == two.getTimeInMillis(); } }