Here you can find the source of isWorking(final Date date)
public static boolean isWorking(final Date date)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static boolean isWorking(final Date date) { final int hourOfDay = getHourOfDay(date); if (hourOfDay > 8 && hourOfDay < 19) { return true; }// w w w . ja v a 2s . c om return false; } public static int getHourOfDay(final Date oDate) { if (null == oDate) { return -1; } final Calendar cal = Calendar.getInstance(); cal.setTime(oDate); return cal.get(Calendar.HOUR_OF_DAY); } }