Skip to content

Commit

Permalink
docs: update select format paragraph (formatjs#2782)
Browse files Browse the repository at this point in the history
add Unicode `Pattern_Syntax` reference url in select format paragraph
  • Loading branch information
mtsdalmolin authored Mar 31, 2021
1 parent 90af25f commit 776f14f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/docs/core-concepts/icu-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Similar to `number` type, we also support ICU DateTime skeleton. ICU provides a

### `{select}` Format

The `{key, select, matches}` is used to choose output by matching a value to one of many choices. (It is similar to the `switch` statement available in some programming languages.) The key is looked up in the input data. The corresponding value is matched to one of matches and the corresponding output is returned. The `matches` is a space-separated list of `matches`.
The `{key, select, matches}` is used to choose output by matching a value to one of many choices. (It is similar to the `switch` statement available in some programming languages.) The key is looked up in the input data. The corresponding value is matched to one of matches and the corresponding output is returned. The `key` argument must follow [Unicode Pattern_Syntax](https://www.unicode.org/reports/tr31/tr31-9.html#Pattern_Syntax). The `matches` is a space-separated list of `matches`.

The format of a match is match `{output}`. (A match is similar to the case statement of the switch found in some programming languages.) The `match` is a literal value. If it is the same as the value for `key` then the corresponding `output` will be used.

Expand Down

0 comments on commit 776f14f

Please sign in to comment.