Here you can find the source of getDayName(int i)
public static String getDayName(int i)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { public static String getDayName(int i) { String dayname = ""; switch (i) { case Calendar.MONDAY: dayname = "M"; break; case Calendar.TUESDAY: dayname = "T"; break; case Calendar.WEDNESDAY: dayname = "W"; break; case Calendar.THURSDAY: dayname = "T"; break; case Calendar.FRIDAY: dayname = "F"; break; case Calendar.SATURDAY: dayname = "S"; break; case Calendar.SUNDAY: dayname = "S"; break; default:// w w w . j a v a2 s .com break; } return dayname; } }