Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2017437 | 1.2.0 | John Oconner | P3 | Resolved | Fixed | 1.2beta3 |
Name: paC48320 Date: 10/16/97
SimpleDateFormat uses the default number format for a given locale to format any
numbers it had to format. If the default number pattern for a particular locale
has required digits after the decimal point (e.g., "#,##0.00" instead of "#,##0.##"),
all the numbers produced by the DateFormat will have these decimal places, leading
bizarre results.
Right now, lt_LT (Lithuanian) has this problem. The following code:
DateFormat formatter = DateFormat.getTimeInstance(DateFormat.MEDIUM, new Locale("lt", "LT", ""));
System.out.println(formatter.format(new Date(1997, 10, 14, 10, 15, 31));
will produce
10,00.15,00.31,00
instead of
10.15.31
======================================================================
- backported by
-
JDK-2017437 SimpleDateFormat shouldn't use decimals
-
- Resolved
-