-
Bug
-
Resolution: Fixed
-
P4
-
6u21, 7
-
b13
-
x86, sparc
-
solaris_10
-
Verified
FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
In Latvia first day of the week is Monday.
This bug is the same as in
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4527203
Most European countries, as first day of the week have Monday.
Fix for this problem is easy:
FormatData_lv_LV.java (sun.text.resources package) needs the following:
{ "DateTimeElements",
new String[] {
"2", // first day of week
"1" // min days in first week
}
}
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile this:
Calendar cal = Calendar.getInstance(new Locale("lv", "LV"));
System.out.println("first day of the week: " + cal.getFirstDayOfWeek());
System.out.println("Calendar Sunday: " + Calendar.SUNDAY);
System.out.println("Calendar Monday: " + Calendar.MONDAY);
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Output of the code above:
first day of the week: 2
Calendar Sunday: 1
Calendar Monday: 2
ACTUAL -
first day of the week: 1
Calendar Sunday: 1
Calendar Monday: 2
REPRODUCIBILITY :
This bug can be reproduced always.
A DESCRIPTION OF THE PROBLEM :
In Latvia first day of the week is Monday.
This bug is the same as in
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4527203
Most European countries, as first day of the week have Monday.
Fix for this problem is easy:
FormatData_lv_LV.java (sun.text.resources package) needs the following:
{ "DateTimeElements",
new String[] {
"2", // first day of week
"1" // min days in first week
}
}
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile this:
Calendar cal = Calendar.getInstance(new Locale("lv", "LV"));
System.out.println("first day of the week: " + cal.getFirstDayOfWeek());
System.out.println("Calendar Sunday: " + Calendar.SUNDAY);
System.out.println("Calendar Monday: " + Calendar.MONDAY);
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Output of the code above:
first day of the week: 2
Calendar Sunday: 1
Calendar Monday: 2
ACTUAL -
first day of the week: 1
Calendar Sunday: 1
Calendar Monday: 2
REPRODUCIBILITY :
This bug can be reproduced always.
- duplicates
-
JDK-6990363 JDK Latvian locale first day of the week is Monday
-
- Closed
-