Here you can find the source of isSameSecond(Calendar c1, Calendar c2)
public static boolean isSameSecond(Calendar c1, Calendar c2)
//package com.java2s; import java.util.Calendar; import static java.util.Calendar.*; public class Main { public static boolean isSameSecond(Calendar c1, Calendar c2) { return isSameInField(SECOND, c1, c2); }//from w w w .j a v a2 s . co m public static boolean isSameInField(int field, Calendar c1, Calendar c2) { int field1 = c1.get(field); int field2 = c2.get(field); return field1 == field2; } }