Java Calendar Second isSameSecond(Calendar c1, Calendar c2)

Here you can find the source of isSameSecond(Calendar c1, Calendar c2)

Description

is Same Second

License

Open Source License

Declaration

public static boolean isSameSecond(Calendar c1, Calendar c2) 

Method Source Code

//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;
    }
}

Related

  1. getTimeInSeconds(Calendar t)
  2. getTimeSeconds(Calendar cal)
  3. getTimestampInDayFirstSecond(final Calendar calendar)
  4. hasPassed10Second(Calendar time)
  5. isFirstAfterSecond(Calendar first, Calendar second)
  6. moveToCalendarSecondJustFor(Calendar cal, int second)
  7. moveToCalendarSecondTerminal(Calendar cal)
  8. moveToCalendarSecondTerminalFor(Calendar cal, int second)
  9. resetSeconds(Calendar cal)