I saw some kind of peculiar behavior regarding what affects these java.util.Calendar properties.
Conclusion
Certain facts:
- Java
Locale determined by the language in the system settings. - The two Calendar properties are independent of the Java language that was modified using the Mac language. Instead, they are determined by the choice of region in the system settings.
- Oddly enough, and possibly an error, manually selecting the First day of week pop-up menu in System Preferences does not affect the equivalent Java property. It affects how Mac setup as part of region selection affects Java, but there’s no way to manually select a pop-up menu.
- Setting the Java language through the Mac language setting does not affect the Calendar properties, but passing the Calendar constructor to the Calendar affects its properties (obvious contradiction).
More details
Running this code as a test.
import java.util.Calendar; import java.util.Date; import java.util.Locale; import java.util.TimeZone; public class TestCalendar { public static void main( String[] args ) { Locale locale = Locale.getDefault(); Calendar c = Calendar.getInstance(); c.setTime( new Date( new Long( 1293840000000l ) ) );
Using Mac OS X 10.8.5 (Mountain Lion) in a Parallels 9 virtual machine hosted on Mac OS X (Mavericks), with Java 8 Update 11 with the United States locale selected during OS installation, I played with System Preferences > Language & Text

System Preferences> Language and Text> Region> First Day of the Week
Strangely, changing the First day of week on the Region tab does not affect. Java tells FirstDayOfWeek: 1 whether I set this popup menu to Sunday or Monday.
Locale: en_US | FirstDayOfWeek: 1 | MinimialDaysInFirstWeek: 1
Restarting the NetBeans IDE does not help. Restarting the Mac (virtual machine) does not help.
System Preferences> Language and Text> Region
On the Region tab, select the Show All Regions check box to see many more regions. Choose French > France . Launch the IDE immediately. No need to restart the IDE or OS, or even close the System Preferences window.
Locale: en_US | FirstDayOfWeek: 2 | MinimialDaysInFirstWeek: 4
Interesting in two accounts.
- Now we know that the Region parameter affects both of these key calendar settings, but Locale has not changed. A value of
2 as FirstDayOfWeek means Monday , which is true for France (and most of the world). - Another problem is a strange, possibly bug: First Day of the Week popup that seems to affect Java when it is installed as part of a larger Region change, but manually selects that the popup does not affect the Java properties in question .
Resetting the Region popup to United States restores Java properties that are consistent and expected:
Locale: en_US | FirstDayOfWeek: 1 | MinimialDaysInFirstWeek: 1
System Preferences> Language and Text> Language
On the Language tab, drag Français (French) to the top of the list so that it appears before English.
Run the IDE immediately.
Locale: fr_FR | FirstDayOfWeek: 1 | MinimialDaysInFirstWeek: 1
Interesting again. We now know that Java Locale is determined by the Mac Language setting. And we know that this does not affect the properties of the calendar in question.
So, do you think that Mac Language defines Java Locale, and Java Locale does not affect calendar properties? It’s right when you read above, but wrong when you read in the next section, where we see that Java Locale, installed in another way, can affect the properties of the Calendar. Very confusing.
Skip Java Language
another contradiction is found. Bring the Mac back to the US by default: (1) English at the top of the list of languages, (2) The region is set to the United States.
Modify our code to pass Locale to the calendar constructor.
Calendar c = Calendar.getInstance( Locale.FRANCE );
This affects the properties of the Calendar:
FirstDayOfWeek: 2 | MinimialDaysInFirstWeek: 4
So the confusing contradiction:
- Setting the Java language through the Mac language does not affect calendar properties.
- Passing Locale explicitly to the calendar constructor affects its properties.