Here you can find the source of getHourInt()
public static int getHourInt()
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static int getHourInt() { Calendar ca = Calendar.getInstance(); ca.setTime(new Date()); return ca.get(Calendar.HOUR_OF_DAY); }/*from w w w.jav a2 s . c om*/ }