Weekday Short Name List
import java.text.DateFormatSymbols;
public class Main {
public static void main(String[] args) {
String[] shortWeekdays = new DateFormatSymbols().getShortWeekdays();
for (int i = 0; i < shortWeekdays.length; i++) {
String shortWeekday = shortWeekdays[i];
System.out.println("shortWeekday = " + shortWeekday);
}
}
}
Output:
shortWeekday =
shortWeekday = Sun
shortWeekday = Mon
shortWeekday = Tue
shortWeekday = Wed
shortWeekday = Thu
shortWeekday = Fri
shortWeekday = Sat
Home
Java Book
Runnable examples
Java Book
Runnable examples
Date Format:
- Default date format
- Full date format
- Long Date Format
- Medium Locale Canada time format
- Short date Format
- Short Time Format
- Pattern date Format
- Format date(a): am/pm marker
- Format date(d): day in number
- Format date(dd): day in two digits number format
- Format date(E):Day of week
- Format date(EEEE): full name of day of week
- Format date format(h):hour in number
- Format date(hh): hour in two digits number
- Format date(H):hour in a day 24 hour format (0-23)
- Format date(HH):hour in a day two digit(0-23)
- Format date(k):hour in a day(1-24)
- Format date(kk):hour in a day(1-24) two digits
- Format date(K):hour in a day (0-11 in AM/PM)
- Format date(KK): hour in a day (00-11)
- Format date(m): minute
- Format data component(mm):minute in two digit(01, 02 etc.)
- Format date(M):month in 1-12
- Format date(MM):month in two digit( 01, 02 etc.)
- Format date(MMM): month in short name(Jan, Feb etc.)
- Format date(MMMM): month in full name(January, February etc.)
- Format date(s): second
- Format date(ss): second in two digit(01, 02 etc.)
- Format date(yy):year in two digit format( 07, 08 etc.)
- Format date(yyyy):year in full four digit(2007, 2008 etc.)
- Format date(z):time zone
- Format date(Z): time zone in offset
- Format date(zzzz): time zone in full description
- Format date:hh:mm:ss a
- Format date:HH.mm.ss
- Format date:HH:mm:ss Z
- Format date(HH:mm:ss:SSS)
- Format date:MM/dd/yy
- Format date:mm-dd-yyyy hh:mm:ss
- Format date:dd-MMM-yy
- format date:dd MMM yyyy hh:mm:ss a
- Format Date:EEEE MMMMM dd yyyy kk:mm:ss
- Format date:E, dd MMM yyyy HH:mm:ss Z
- Format date:YYYYMMDD
- Locale available for date format
- Locale date format
- Locale date time Format
- Locale Canada Default date format
- Locale Canada Default time format
- Locale Canada Full time format
- Locale Canada Long time format
- Date Format pattern string
- Month Name List
- Short Month Name List
- Weekday Name List
- Weekday Short Name List
- Change date format symbols
- Date Format Symbol
- Current default date format
- Format a date using Rfc822 Date Format