-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
None
-
11
ADDITIONAL SYSTEM INFORMATION :
OS : Windows 10
JRE : 11.8 and 11.9
A DESCRIPTION OF THE PROBLEM :
Using the following code on JDK 11.8/11.9 -
LocalDate dt = LocalDate.now();
String dtStr= dt.format(DateTimeFormatter.ofPattern("dd-MMM-yyyy"));
Output is -
dt= 2020-11-20
dtStr = 20-Nov.-2020
Notice the "." in dtStr which is incorrect.
LocalDateTime with the same format pattern("dd-MMM-yyyy") also yields the "." in the resultant string.
The same error is not observed on JDK 8. I have not tested with JDK>11.
REGRESSION : Last worked in version 8
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the following code snippet -
LocalDate dt = LocalDate.now();
String dtStr= dt.format(DateTimeFormatter.ofPattern("dd-MMM-yyyy"));
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
dt= 2020-11-20
dtStr = 20-Nov-2020
ACTUAL -
dt= 2020-11-20
dtStr = 20-Nov.-2020
CUSTOMER SUBMITTED WORKAROUND :
Using substring at the moment to overcome the "." in the resultant string.
FREQUENCY : always
OS : Windows 10
JRE : 11.8 and 11.9
A DESCRIPTION OF THE PROBLEM :
Using the following code on JDK 11.8/11.9 -
LocalDate dt = LocalDate.now();
String dtStr= dt.format(DateTimeFormatter.ofPattern("dd-MMM-yyyy"));
Output is -
dt= 2020-11-20
dtStr = 20-Nov.-2020
Notice the "." in dtStr which is incorrect.
LocalDateTime with the same format pattern("dd-MMM-yyyy") also yields the "." in the resultant string.
The same error is not observed on JDK 8. I have not tested with JDK>11.
REGRESSION : Last worked in version 8
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the following code snippet -
LocalDate dt = LocalDate.now();
String dtStr= dt.format(DateTimeFormatter.ofPattern("dd-MMM-yyyy"));
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
dt= 2020-11-20
dtStr = 20-Nov-2020
ACTUAL -
dt= 2020-11-20
dtStr = 20-Nov.-2020
CUSTOMER SUBMITTED WORKAROUND :
Using substring at the moment to overcome the "." in the resultant string.
FREQUENCY : always