-
Bug
-
Resolution: Unresolved
-
P4
-
7, 8
-
Fix Understood
-
x86
-
os_x
FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
Month names as formatted by SimpleDateFormat for the pt_BR are capitalized. Month names in Brazil are not capitalized. (They are in Portugal, but not Brazil)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the following code:
Locale brazil = new Locale("pt","BR");
SimpleDateFormat format = new SimpleDateFormat("d 'de' MMMM", brazil);
Date date = new Date(2012, 5, 28);
String result = format.format(date);
System.out.println(result);
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
28 de junho
ACTUAL -
28 de Junho
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Locale brazil = new Locale("pt","BR");
SimpleDateFormat format = new SimpleDateFormat("d 'de' MMMM", brazil);
Date date = new Date(2012, 5, 28);
String result = format.format(date);
System.out.println(result);
---------- END SOURCE ----------
A DESCRIPTION OF THE PROBLEM :
Month names as formatted by SimpleDateFormat for the pt_BR are capitalized. Month names in Brazil are not capitalized. (They are in Portugal, but not Brazil)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the following code:
Locale brazil = new Locale("pt","BR");
SimpleDateFormat format = new SimpleDateFormat("d 'de' MMMM", brazil);
Date date = new Date(2012, 5, 28);
String result = format.format(date);
System.out.println(result);
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
28 de junho
ACTUAL -
28 de Junho
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Locale brazil = new Locale("pt","BR");
SimpleDateFormat format = new SimpleDateFormat("d 'de' MMMM", brazil);
Date date = new Date(2012, 5, 28);
String result = format.format(date);
System.out.println(result);
---------- END SOURCE ----------
- duplicates
-
JDK-8017150 Formatted Date has incorrectly title-cased month in Brazilian Portuguese
-
- Closed
-