http://gwt-code-reviews.appspot.com/1099801/diff/26001/27003
File user/src/com/google/gwt/text/client/NumberFormatRenderer.java
(right):

http://gwt-code-reviews.appspot.com/1099801/diff/26001/27003#newcode31
user/src/com/google/gwt/text/client/NumberFormatRenderer.java:31:
this(NumberFormat.getDecimalFormat());
On 2010/11/18 05:46:19, rjrjr wrote:
The javadoc on this says it uses the format for the "default locale."
That's no
good, right? The default case should use the user's locale. That's why
DateTimeFormatRenderer defaults to
DateTimeFormat.getFormat(PredefinedFormat.DATE_SHORT)

A GWT app is only running in one locale at a time, and that gets the
default number format for the currently running locale.  I agree the
Javadoc is less clear than it should be.

Defaulting the date to DATE_SHORT is ok, though depending on what you
are doing, DATE_MEDIUM might be a better choice.

There is actually a locale-specific default format in DateTimeFormatInfo
(which is the medium format more often than not), but I just now noticed
that we don't actually expose it :(.  I should probably add
DATE_DEFAULT, TIME_DEFAULT, and DATE_TIME_DEFAULT to expose those.

http://gwt-code-reviews.appspot.com/1099801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to