Digit grouping and minimumGroupingDigits

25 views
Skip to first unread message

Edward Welbourne

unread,
Aug 4, 2023, 9:24:43 AM8/4/23
to cldr-...@unicode.org
Hi all,

Some time ago I attempted to implement digit grouping according to
CLDR's data; in the course of that I interpreted minimumGroupingDigits
as the smallest size that the most-significant group could be, so that a
minimum grouping of 2 with a pattern grouping of 3 would not only write
one thousand as 1000 but also one million as 1000,000 (if separator is
comma), again omitting the separator for a leading group that would have
only one digit in it.

Prompted by a user bug-report, I'm now re-reading [0]

The minimumGroupingDigits can be used to suppress groupings below a
certain value. This is used for languages such as Polish, where one
would only write the grouping separator for values above 9999. The
minimumGroupingDigits contains the default for the locale.
* The attribute value is used by adding it to the grouping separator
value. If the input number has fewer integer digits, the grouping
separator is suppressed.

[0] just above
https://www.unicode.org/reports/tr35/tr35-63/tr35-numbers.html#Examples_of_minimumGroupingDigits

as meaning that grouping is suppressed for 1000 through 9999 but, after
that, digits are grouped in blocks of three even if this leaves the most
significant digit in a group of size one, so 1,234,567 rather than
1234,567 (as I'd previously supposed).

First I'd like to check: is my revised interpretation correct ? Or am I
misleading myself by misreading it ? If the latter, perhaps we can come
up with better wording. If the former, it would perhaps be better if
* the specification overtly said that, once there is one group, the most
significant group can be smaller than the minimumGroupingDigits size,
* the table linked above could also include entries for one million in
the pattern-grouping = 3 parts.

Eddy.

Mark Davis Ⓤ

unread,
Aug 4, 2023, 10:06:21 AM8/4/23
to Edward Welbourne, cldr-...@unicode.org
It only has an effect at the lowest level, the first grouping separator from the left. So with 2 you'd get
1000
10,000
100,000
1,000,000
...

--
You received this message because you are subscribed to the Google Groups "CLDR Users Public Mail List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cldr-users+...@unicode.org.
To view this discussion on the web visit https://groups.google.com/a/unicode.org/d/msgid/cldr-users/DU0PR02MB821868603E69574D8933F89E8709A%40DU0PR02MB8218.eurprd02.prod.outlook.com.

Edward Welbourne

unread,
Aug 4, 2023, 10:08:24 AM8/4/23
to Mark Davis Ⓤ, cldr-...@unicode.org
Mark Davis Ⓤ (4 August 2023 16:06) wrote:
> It only has an effect at the lowest level, the first grouping separator from the left. So with 2 you'd get
> 1000
> 10,000
> 100,000
> 1,000,000
> ...

Thanks for the speedy clarification.
I'll fix my implementation, then ;^>

Eddy.

Reply all
Reply to author
Forward
0 new messages