Here you can find the source of getDayName(Calendar cal)
public static String getDayName(Calendar cal)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { static String[] dayName = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" }; public static String getDayName(Calendar cal) { String month = dayName[cal.get(Calendar.DAY_OF_WEEK) - 1]; return month; }/*from w w w .j av a2 s . c om*/ }