Here you can find the source of isWeekday(Calendar cal)
private static boolean isWeekday(Calendar cal)
//package com.java2s; /************************************************************************************** * Copyright (C) 2008 EsperTech, Inc. All rights reserved. * * http://esper.codehaus.org * * http://www.espertech.com * * ---------------------------------------------------------------------------------- * * The software in this package is published under the terms of the GPL license * * a copy of which has been included with this distribution in the license.txt file. * **************************************************************************************/ import java.util.Calendar; public class Main { private static boolean isWeekday(Calendar cal) { int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK); return !(dayOfWeek < Calendar.MONDAY || dayOfWeek > Calendar.FRIDAY); }/* ww w. j a v a 2 s .c o m*/ }