You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While upgrading from Java 8 to Java 21 I noticed the default formatting of US currency changed from displaying negative numbers within parenthesis to displaying the minus sign, i.e. value -123 displayed as ($123) in Java 8 and -$123 in Java 21. This behavior was probably introduced in an earlier JDK version
According to OpenJDK's NumberFormatProviderImpl, this behavior could be accomplished again by using a Locale with an extension e.g. en-US-u-cf-account. However, using <fmt:setLocale value="en-US-u-cf-account"/> has no effect on <fmt:formatNumber>
The text was updated successfully, but these errors were encountered:
While upgrading from Java 8 to Java 21 I noticed the default formatting of US currency changed from displaying negative numbers within parenthesis to displaying the minus sign, i.e. value -123 displayed as
($123)
in Java 8 and-$123
in Java 21. This behavior was probably introduced in an earlier JDK versionAccording to OpenJDK's NumberFormatProviderImpl, this behavior could be accomplished again by using a Locale with an extension e.g.
en-US-u-cf-account
. However, using<fmt:setLocale value="en-US-u-cf-account"/>
has no effect on<fmt:formatNumber>
The text was updated successfully, but these errors were encountered: