Java Tutorial/I18N/DateFormatSymbols
Версия от 17:44, 31 мая 2010; (обсуждение)
An alternate way to get week days symbols
import java.text.DateFormatSymbols;
import java.util.Calendar;
public class Main {
public static void main(String[] args) {
String dayNames[] = new DateFormatSymbols().getWeekdays();
Calendar date2 = Calendar.getInstance();
System.out.println("Today is a " + dayNames[date2.get(Calendar.DAY_OF_WEEK)]);
}
}