Here you can find the source of getCurrentDayOfWeek()
public static int getCurrentDayOfWeek()
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { public static int getCurrentDayOfWeek() { Calendar calendar = Calendar.getInstance(); int weekday = calendar.get(Calendar.DAY_OF_WEEK); return weekday; }/*from ww w .j av a2s.c o m*/ }