JDK-7002525 : Calendar.getFirstDayOfWeek() returns Monday instead of Sunday for pt_BR
  • Type: Bug
  • Component: globalization
  • Sub-Component: locale-data
  • Affected Version: 6u22
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2010-11-24
  • Updated: 2013-06-19
  • Resolved: 2013-06-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Resolved
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600] SP3

A DESCRIPTION OF THE PROBLEM :
Calendar.getFirstDayOfWeek() returns 2 (Monday) instead of 1 (Sunday) for the pt_BR Locale.



STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Any call of getFirstDayOfWeek with a Calendar object just created with the pt_BR locate presents the problem.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
First day is 1
ACTUAL -
First day is 2

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.util.Calendar;
import java.util.Locale;
public class TestCal
{
	public static void main(String[] args)
	{
		Calendar cal = Calendar.getInstance(new Locale("pt", "BR"));
		System.out.println("First day is " + cal.getFirstDayOfWeek());
	}
}

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
use cal.getFirstDayOfWeek(1) every time that the pt_BR locale is used.

Comments
Dupicate of JDK-8013836, which will be fixed in Java 8.
19-06-2013

EVALUATION Target the CR to Java 8.
20-06-2011