Here you can find the source of getShortWeekday(String day)
Parameter | Description |
---|
public static String getShortWeekday(String day)
//package com.java2s; /*/*from www . j a v a2 s. c o m*/ * Copyright (C) 2015 University of Oregon * * You may distribute under the terms of either the GNU General Public * License or the Apache License, as specified in the LICENSE file. * * For more information, see the LICENSE file. */ import java.util.*; import java.text.*; public class Main { /** * Get short day string for current locale * @param short day string in default locale (en_US) (e.g. Mon, Tue) * @return short day string in language of current locale */ public static String getShortWeekday(String day) { DateFormatSymbols symbols; String[] defaultDays; String[] Days; symbols = new DateFormatSymbols(new Locale("en", "US")); // for default locale defaultDays = symbols.getShortWeekdays(); symbols = new DateFormatSymbols(); // for current locale Days = symbols.getShortWeekdays(); int i = 0; for (i = 0; i < defaultDays.length; i++) { if (day.equals(defaultDays[i])) return Days[i]; } return day; // not found } }