|
147 | 147 | <function name="number">
|
148 | 148 | <!-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat -->
|
149 | 149 | <description>
|
150 |
| - Locale-sensitive number formatting |
| 150 | + Number selection and formatting |
151 | 151 | </description>
|
152 | 152 |
|
153 | 153 | <formatSignature>
|
|
249 | 249 | </option>
|
250 | 250 | </formatSignature>
|
251 | 251 |
|
| 252 | + <matchSignature> |
| 253 | + <input validationRule="anyNumber"/> |
| 254 | + <option name="select" values="plural ordinal exact" default="plural"> |
| 255 | + <description> |
| 256 | + The number selection type. |
| 257 | + |
| 258 | + One of three selection models for numeric values, defaulting to "plural". |
| 259 | + |
| 260 | + Each selector type matches numeric values to keys using the "number-literal" |
| 261 | + production from the ABNF. |
| 262 | + The "plural" and "ordinal" selectors also use plural or ordinal rules from CLDR |
| 263 | + to match categories "zero", "one", "two", "few", "many" and "other" with a lower |
| 264 | + match quality than exact numeric match. |
| 265 | + </description> |
| 266 | + </option> |
| 267 | + <option name="minimumIntegerDigits" values="positiveInteger" default="1"> |
| 268 | + <description> |
| 269 | + The minimum number of integer digits to use. |
| 270 | + A value with a smaller number of integer digits than this number will be |
| 271 | + left-padded with zeros (to the specified length) when formatted. |
| 272 | + </description> |
| 273 | + </option> |
| 274 | + <option name="minimumFractionDigits" values="positiveInteger"> |
| 275 | + <description> |
| 276 | + The minimum number of fraction digits to use. |
| 277 | + The default for plain number and percent formatting is 0; |
| 278 | + the default for currency formatting is the number of minor unit digits provided by |
| 279 | + the ISO 4217 currency code list (2 if the list doesn't provide that information). |
| 280 | + </description> |
| 281 | + </option> |
| 282 | + <option name="maximumFractionDigits" values="positiveInteger"> |
| 283 | + <description> |
| 284 | + The maximum number of fraction digits to use. |
| 285 | + The default for plain number formatting is the larger of minimumFractionDigits and 3; |
| 286 | + the default for currency formatting is the larger of minimumFractionDigits and the number of minor |
| 287 | + unit digits provided by the ISO 4217 currency code list (2 if the list doesn't provide that information); |
| 288 | + the default for percent formatting is the larger of minimumFractionDigits and 0. |
| 289 | + </description> |
| 290 | + </option> |
| 291 | + <option name="minimumSignificantDigits" values="positiveInteger" default="1"> |
| 292 | + <description> |
| 293 | + The minimum number of significant digits to use. |
| 294 | + </description> |
| 295 | + </option> |
| 296 | + <option name="maximumSignificantDigits" values="positiveInteger" default="21"> |
| 297 | + <description> |
| 298 | + The maximum number of significant digits to use. |
| 299 | + </description> |
| 300 | + </option> |
| 301 | + <match validationRule="anyNumber" values="zero one two few many other" /> |
| 302 | + </matchSignature> |
| 303 | + |
252 | 304 | <alias name="integer">
|
253 |
| - <description>Locale-sensitive integral number formatting</description> |
| 305 | + <description>Integer selection and formatting</description> |
254 | 306 | <setOption name="maximumFractionDigits" value="0" />
|
255 | 307 | <setOption name="style" value="decimal" />
|
256 | 308 | </alias>
|
| 309 | + |
| 310 | + <alias name="ordinal" supports="match"> |
| 311 | + <description>Ordinal number selection</description> |
| 312 | + <setOption name="select" value="ordinal" /> |
| 313 | + </alias> |
| 314 | + |
| 315 | + <alias name="plural" supports="match"> |
| 316 | + <description>Plural number selection</description> |
| 317 | + <setOption name="select" value="plural" /> |
| 318 | + </alias> |
257 | 319 | </function>
|
258 | 320 |
|
259 | 321 | <function name="string">
|
|
0 commit comments