At 8:31 PM +0100 1/15/04, Michael Scott wrote:
Is this relevant? http://oss.software.ibm.com/icu/userguide/formatNumbers.html

I'm still not clear in my mind what the plan is with regard to ICU. Is it intended eventually to be:

a) an always-there part of parrot, or
b) just a sometimes-there thing that gets linked in if you mess with unicode?



A) is the case. I didn't realize that the ICU library did numeric formatting.


On 15 Jan 2004, at 19:54, Dan Sugalski wrote:

And now for something reasonably trivial...

I'm going to start in on Parrot's COBOLish chunks, in this case numeric formatting.

Now, I'm already painfully aware of some of the locale issues that are involved in formatting numbers and money. (What's the currency symbol, what's the decimal indicator, and what's the numeric grouping character) I've no doubt there are a vast number of them that I'm as yet blissfully unaware of. (I've no idea what one needs to do with numeric formatting in Chinse or Korean or Arabic... Does anyone, BTW? I'd love to know if we've folks fluent in one of those) But, in general, I'm thinking of something more or less akin to what SQL uses, since it's as much a standard as anything else. So, to steal directly from Postgres' manual (with things like roman numerals chopped out):

Table 9-23. Template Patterns for Numeric Formatting

Pattern
Description

9
value with the specified number of digits

0
value with leading zeros

. (period)
decimal point

, (comma)
group (thousand) separator

PR
negative value in angle brackets

S
sign anchored to number (uses locale)

L
currency symbol (uses locale)

D
decimal point (uses locale)

G
group separator (uses locale)

MI
minus sign in specified position (if number < 0)

PL
plus sign in specified position (if number > 0)

SG
plus/minus sign in specified position

--
                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk


--
                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to