Here you can find the source of getWeekdayForInt(int value)
Calendar
.
Parameter | Description |
---|---|
value | An int value for a weekday |
public static String getWeekdayForInt(int value)
//package com.java2s; //License from project: LGPL import java.util.*; public class Main { /**/*from w ww . j av a 2 s .c om*/ * Return a string name for the contants from <code>Calendar</code>. * @param value An int value for a weekday * @return A string containing the name of the weekday or "unknown" if value is below 0 or above 6. */ public static String getWeekdayForInt(int value) { switch (value) { case Calendar.MONDAY: return "Monday"; case Calendar.TUESDAY: return "Tuesday"; case Calendar.WEDNESDAY: return "Wednesday"; case Calendar.THURSDAY: return "Thursday"; case Calendar.FRIDAY: return "Friday"; case Calendar.SATURDAY: return "Saturday"; case Calendar.SUNDAY: return "Sunday"; default: return "Unknown"; } } }