is Same Time between two Calendar - Android java.util

Android examples for java.util:Calendar

Description

is Same Time between two Calendar

Demo Code


//package com.java2s;
import java.util.Calendar;

public class Main {
    public static boolean isSameTime(Calendar startTime, Calendar endTime) {
        if (startTime.get(Calendar.HOUR) == endTime.get(Calendar.HOUR)
                && startTime.get(Calendar.MINUTE) == endTime
                        .get(Calendar.MINUTE))
            return true;
        else/* w  ww . j  a  v  a 2 s  .c  o  m*/
            return false;
    }
}

Related Tutorials