Open patch opened 8 years ago
As a first step, let's get an API drafted possibly by benchmarking existing implementations.
Here are the Perl CLDR::Number range
docs and tests. Note that I implemented it for numbers, percents, and prices, but it's only explicitly defined in UTS #35 for numbers. I chatted with Mark Davis about this at IUC39 and am going to propose standardizing and documenting ranges of percents and prices to the CLDR-TC. For the number ranges at least, the current specification is stable.
:+1:
See also the atLeast
pattern, which is the only other pattern in miscPatterns
, so it would make sense to draft the API with both in mind. I don't personally use it, but implemented it as at_least
in CLDR::Number. (More unit tests for both of these: https://github.com/patch/cldr-number-pm5/blob/master/t/from-uts35.t#L50-L53)
CLDR supports
range
patterns undermiscPatterns
and are very useful for formatting ranges of numbers (e.g. 5–10), with each number formatted appropriately as well as the range itself.http://unicode.org/reports/tr35/tr35-numbers.html#Miscellaneous_Patterns