2004-05-30 Michael Koch <konqueror@gmx.de>
* java/text/DecimalFormat.java (parse): Fixed parsing of decimal strings. Number of maximum digits to be read should now work. * java/text/SimpleDateFormat.java (SimpleDateFormat): Set maximumFractionDigit to 0 for the number formatter. This fixes DateFormatTest. From-SVN: r82449
This commit is contained in:
parent
1b2545bcf2
commit
289f9db7db
3 changed files with 22 additions and 6 deletions
|
@ -189,6 +189,7 @@ public class SimpleDateFormat extends DateFormat
|
|||
numberFormat = NumberFormat.getInstance(locale);
|
||||
numberFormat.setGroupingUsed (false);
|
||||
numberFormat.setParseIntegerOnly (true);
|
||||
numberFormat.setMaximumFractionDigits (0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -216,6 +217,7 @@ public class SimpleDateFormat extends DateFormat
|
|||
numberFormat = NumberFormat.getInstance(locale);
|
||||
numberFormat.setGroupingUsed (false);
|
||||
numberFormat.setParseIntegerOnly (true);
|
||||
numberFormat.setMaximumFractionDigits (0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -234,6 +236,7 @@ public class SimpleDateFormat extends DateFormat
|
|||
numberFormat = NumberFormat.getInstance();
|
||||
numberFormat.setGroupingUsed (false);
|
||||
numberFormat.setParseIntegerOnly (true);
|
||||
numberFormat.setMaximumFractionDigits (0);
|
||||
}
|
||||
|
||||
// What is the difference between localized and unlocalized? The
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue