Here you can find the source of getWeekDay(Calendar cal)
public static String getWeekDay(Calendar cal)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { public static String getWeekDay(Calendar cal) { int Day_No = cal.get(Calendar.DAY_OF_WEEK); String WeekDay = "Sunday"; switch (Day_No) { case Calendar.SUNDAY: { WeekDay = "Sun"; break; }/* w w w . ja v a 2s .c om*/ case Calendar.MONDAY: { WeekDay = "Mon"; break; } case Calendar.TUESDAY: { WeekDay = "Tue"; break; } case Calendar.WEDNESDAY: { WeekDay = "Wed"; break; } case Calendar.THURSDAY: { WeekDay = "Thu"; break; } case Calendar.FRIDAY: { WeekDay = "Fri"; break; } case Calendar.SATURDAY: { WeekDay = "Sat"; break; } } return WeekDay; } }