Here you can find the source of getDayOfWeekShortString(Date date)
public static String getDayOfWeekShortString(Date date)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static String getDayOfWeekShortString(Date date) { int dayOfWeek = getDayOfWeek(date); switch (dayOfWeek) { case 1:// w w w .j ava 2 s . c o m return "Sun"; case 2: return "Mon"; case 3: return "Tue"; case 4: return "Wed"; case 5: return "Thu"; case 6: return "Fri"; case 7: return "Sat"; } return null; } public static int getDayOfWeek(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date); return calendar.get(Calendar.DAY_OF_WEEK); } }