Seemigly innocent statements in the Calendar.getFirstDayOfWeek() Javadoc:
I can't count the number of times that this has tripped up my colleagues: they typically develop on their XP boxes with the locale set to Italian, and then scratch their head perplexed when a nearby Linux box displays the dates with a 1-day offset.
Lesson of the day: RTFJ (Read The F... Javadoc).
Calendar defines a locale-specific seven day week using two parameters: the first day of the week and the minimal days in first week (from 1 to 7). These numbers are taken from the locale resource data when a Calendar is constructed. They may also be specified explicitly through the API.(emphasis mine)
...
Gets what the first day of the week is; e.g., Sunday in US, Monday in France.
I can't count the number of times that this has tripped up my colleagues: they typically develop on their XP boxes with the locale set to Italian, and then scratch their head perplexed when a nearby Linux box displays the dates with a 1-day offset.
Lesson of the day: RTFJ (Read The F... Javadoc).
So true. From EFnet IRC #java eartler this month: -------------------------------