Comments

Since ever format has to be a locale, as it does not make sense for a "currency" to be formatted in a way where users are not able to recognise what it represents.

Posted by Nils Caspar (pencil) on 2010-03-21T01:37:20.000+0000

Documentation says:
{quote}
format: Defines the format which should be used for displaying numbers. This number-format includes for example the thousand separator. You can either use a default format by giving a locale identifier, or define the number-format manually.
{quote}

A bug is a "difference between documentation and the actual product." (wikipedia) and that's exactly the case here.
Either the documentation should be changed or the code should be fixed. I prefer the second option ;)

Posted by Thomas Weidner (thomas) on 2010-03-21T09:54:03.000+0000

What would you need the format option for when it would not be used with a locale?

Which format would you want to give which would not be simpler available with the other options?

Posted by Nils Caspar (pencil) on 2010-03-21T10:50:05.000+0000

The format of the swiss (german) locale: ¤ #,##0.00;¤-#,##0.00
I would like to have a space between the currency and the "-" sign (¤ -#,##0.00)...

But why are we discussing the sense of this use case? Documentation says it is possible, but it actually isn't...

Posted by Thomas Weidner (thomas) on 2010-03-21T11:17:29.000+0000

You could simply use "de_CH" as format which already archives this.

And regarding discussion: When I don't see a benefit for a issue I want to know the rationale behind it before closing, changing or implementing it.

Actually I see no benefit for this issue. In my eyes it makes things even a little more complicated.

When you don't want to discuss and give the reasons behind it then just say a word and I will close it.

Posted by Nils Caspar (pencil) on 2010-03-21T11:24:25.000+0000

I'm using "de_CH" but as I said there is a space between the "-" and the currency missing.
Expected: Fr. -10.20
Actual: Fr.-10.20

The space itself can not be used as format... the format option only allows "#", ",", ".", "0" and "-" as input.

For such a format you will need to use a extended class as it's no localized but a customized format.

Posted by Nils Caspar (pencil) on 2010-03-21T11:52:00.000+0000

{quote}
When you think that CLDR is wrong, then please fill an issue within Unicode (http://unicode.org/cldr)
{quote}
I don't want to change the unicode speficication, I just want to use my custom format.

{quote}
The space itself can not be used as format... the format option only allows "#", ",", ".", "0" and "-" as input.
{quote}
But the format for the positive numbers has a space in it (¤ #,##0.00)...

Anyway, if you don't implement this as specified in the manual, consider fixing the documentation. :/

Posted by Thomas Weidner (thomas) on 2010-03-21T12:09:39.000+0000

Looking into the format you will see that this character is no space. It's a different unicode character and not part of the format definition.