Here you can find the source of isHour(int hour)
public static boolean isHour(int hour)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { public static boolean isHour(int hour) { return getHourOfDay() == hour; }/*from w w w .jav a 2 s .co m*/ public static int getHourOfDay() { return Calendar.getInstance().get(Calendar.HOUR_OF_DAY); } }