Skip to content

Commit 4ee183f

Browse files
authored
Drop selection from :currency and :unit (#991)
1 parent 04246c3 commit 4ee183f

File tree

2 files changed

+5
-27
lines changed

2 files changed

+5
-27
lines changed

spec/functions/number.md

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ The _function_ `:math` performs selection as described in [Number Selection](#nu
287287
288288
### The `:currency` function
289289
290-
The function `:currency` is a selector and formatter for currency values,
291-
which are a specialized form of numeric selection and formatting.
290+
The function `:currency` is a formatter for currency values,
291+
which are a specialized form of numeric formatting.
292292
293293
#### Operands
294294
@@ -388,15 +388,8 @@ Some implementations might not be able to produce all of these formats for every
388388
> [options](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options)
389389
> in JavaScript's `Intl.NumberFormat`.
390390
391-
> [!NOTE]
392-
> The option `select` does not accept the value `ordinal` because selecting
393-
> currency values using ordinal rules makes no sense.
394-
395391
The following options and their values are required to be available on the function `:currency`:
396392
397-
- `select`
398-
- `plural` (default; see [Default Value of `select` Option](#default-value-of-select-option) below)
399-
- `exact`
400393
- `currency`
401394
- well-formed [Unicode Currency Identifier](https://cldr-smoke.unicode.org/spec/main/ldml/tr35.html#UnicodeCurrencyIdentifier)
402395
(no default)
@@ -475,16 +468,12 @@ contains an implementation-defined currency value
475468
of the _operand_ of the annotated _expression_,
476469
together with the resolved options' values.
477470
478-
#### Selection
479-
480-
The _function_ `:currency` performs selection as described in [Number Selection](#number-selection) below.
481-
482471
### The `:unit` function
483472
484473
The _function_ `:unit` is **Proposed** for inclusion in the next release of this specification but has not yet been finalized.
485-
The _function_ `:unit` is proposed to be a **RECOMMENDED** selector and formatter for unitized values,
474+
The _function_ `:unit` is proposed to be a **RECOMMENDED** formatter for unitized values,
486475
that is, for numeric values associated with a unit of measurement.
487-
This is a specialized form of numeric selection and formatting.
476+
This is a specialized form of numeric formatting.
488477
489478
#### Operands
490479
@@ -528,15 +517,8 @@ In general, the default values for such _options_ depend on the locale,
528517
the unit,
529518
the value of other _options_, or all of these.
530519
531-
> [!NOTE]
532-
> The option `select` does not accept the value `ordinal` because selecting
533-
> unit values using ordinal rules makes no sense.
534-
535520
The following options and their values are required to be available on the function `:unit`:
536521
537-
- `select`
538-
- `plural` (default; see [Default Value of `select` Option](#default-value-of-select-option) below)
539-
- `exact`
540522
- `unit`
541523
- valid [Unit Identifier](https://www.unicode.org/reports/tr35/tr35-general.html#unit-identifiers)
542524
(no default)
@@ -617,10 +599,6 @@ consist of an implementation-defined unit value
617599
of the _operand_ of the annotated _expression_,
618600
together with the resolved _options_ and their resolved values.
619601
620-
#### Selection
621-
622-
The _function_ `:unit` performs selection as described in [Number Selection](#number-selection) below.
623-
624602
#### Unit Conversion
625603
626604
Implementations MAY support conversion to the locale's preferred units via the `usage` _option_.

test/tests/functions/currency.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
{
5656
"src": ".local $n = {42 :currency currency=EUR} .match $n * {{other}}",
5757
"exp": "other",
58-
"expErrors": false
58+
"expErrors": [{ "type": "bad-selector" }]
5959
}
6060
]
6161
}

0 commit comments

Comments
 (0)