In Java, how to get strings of days of week (Sun, Mon, ..., Sat) with system's default Locale (language)

If I have not misunderstood you

 calendar.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.SHORT, Locale.US);

is what you are looking for. Here you can find the documentation,

Or you can also use, getShortWeekdays()

String[] namesOfDays = DateFormatSymbols.getInstance().getShortWeekdays()

Date now = new Date();
// EEE gives short day names, EEEE would be full length.
SimpleDateFormat dateFormat = new SimpleDateFormat("EEE", Locale.US); 
String asWeek = dateFormat.format(now);

You can create the date with your desired date and time. And achieve what you want.


tl;dr

DayOfWeek.MONDAY.getDisplayName( 
    TextStyle.SHORT , 
    Locale.getDefault() 
)

java.time

The Joda-Time project, now in maintenance mode, advises migration to the java.time classes. Much of java.time is back-ported to Android (see below).

DayOfWeek

The DayOfWeek enum defines seven objects, one for each day-of-week. The class offers several handy methods including getDisplayName to generate a string with localized day name.

To localize, specify:

  • TextStyle to determine how long or abbreviated should the string be.
  • Locale to determine (a) the human language for translation of name of day, name of month, and such, and (b) the cultural norms deciding issues of abbreviation, capitalization, punctuation, separators, and such.

Example:

String output = DayOfWeek.MONDAY.getDisplayName( TextStyle.SHORT , Locale.CANADA_FRENCH );

You can use the JVM’s current default time zone rather than specify one. But keep in mind the risk: The default zone can be changed at any moment during execution by any code in any thread of any app running within the JVM.

Locale locale = Locale.getDefault() ;
String output = DayOfWeek.MONDAY.getDisplayName( TextStyle.SHORT , locale );

About java.time

The java.time framework is built into Java 8 and later. These classes supplant the troublesome old legacy date-time classes such as java.util.Date, Calendar, & SimpleDateFormat.

The Joda-Time project, now in maintenance mode, advises migration to the java.time classes.

To learn more, see the Oracle Tutorial. And search Stack Overflow for many examples and explanations. Specification is JSR 310.

Where to obtain the java.time classes?

  • Java SE 8 and SE 9 and later
    • Built-in.
    • Part of the standard Java API with a bundled implementation.
    • Java 9 adds some minor features and fixes.
  • Java SE 6 and SE 7
    • Much of the java.time functionality is back-ported to Java 6 & 7 in ThreeTen-Backport.
  • Android
    • The ThreeTenABP project adapts ThreeTen-Backport (mentioned above) for Android specifically.
    • See How to use ThreeTenABP….