Java tutorial
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { private static String[] NomeGiornoShort = { "DOM", "LUN", "MAR", "MER", "GIO", "VEN", "SAB" }; public static String GetDayOfWeekNameShort(Date d) { return NomeGiornoShort[GetDayOfWeekNumber(d) - 1]; } public static Integer GetDayOfWeekNumber(Date d) { Calendar cal = Calendar.getInstance(); cal.setTime(d); return cal.get(Calendar.DAY_OF_WEEK); } }