Here you can find the source of dayOfWeekFromInteger(String aDay, boolean longName)
public static String dayOfWeekFromInteger(String aDay, boolean longName)
//package com.java2s; public class Main { public static String dayOfWeekFromInteger(String aDay, boolean longName) { if (aDay == "1") { return longName ? "Sunday" : "Sun"; }/*from ww w. j av a2 s .co m*/ if (aDay == "2") { return longName ? "Monday" : "Mon"; } if (aDay == "3") { return longName ? "Tuesday" : "Tue"; } if (aDay == "4") { return longName ? "Wednesday" : "Wed"; } if (aDay == "5") { return longName ? "Thursday" : "Thur"; } if (aDay == "6") { return longName ? "Friday" : "Fri"; } if (aDay == "7") { return longName ? "Saturday" : "Sat"; } return null; } }