Here you can find the source of isDayOfWeek(int day)
public static boolean isDayOfWeek(int day)
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { public static boolean isDayOfWeek(int day) { Calendar strDate = Calendar.getInstance(); if ((strDate.get(Calendar.DAY_OF_WEEK) - 1) == day) { return true; }//from w ww . j a v a 2 s . c om return false; } }