diff --git a/spec/registry.md b/spec/registry.md index 75c470e2e..ca494782f 100644 --- a/spec/registry.md +++ b/spec/registry.md @@ -842,8 +842,10 @@ All other _operand_ values produce a _Bad Operand_ error. The `:datetime` function can use either the appropriate _style options_ or can use a collection of _field options_ (but not both) to control the formatted output. +_Date/time override options_ can be combined with either _style options_ or _field options_. -If both are specified, a _Bad Option_ error MUST be emitted +If both _style options_ and _field options_ are specified, +a _Bad Option_ error is emitted and a _fallback value_ used as the _resolved value_ of the _expression_. If the _operand_ of the _expression_ is an implementation-defined date/time type, @@ -882,7 +884,7 @@ and what format to use for that field. The _field options_ are defined as follows: > [!IMPORTANT] -> The value `2-digit` for some _field options_ **must** be quoted +> The value `2-digit` for some _field options_ MUST be quoted > in the MessageFormat syntax because it starts with a digit > but does not match the `number-literal` production in the ABNF. > ``` @@ -924,11 +926,6 @@ The function `:datetime` has the following options: - `1` - `2` - `3` -- `hourCycle` (default is locale-specific) - - `h11` - - `h12` - - `h23` - - `h24` - `timeZoneName` - `long` - `short` @@ -937,20 +934,6 @@ The function `:datetime` has the following options: - `shortGeneric` - `longGeneric` -> [!NOTE] -> The following options do not have default values because they are only to be used -> as overrides for locale-and-value dependent implementation-defined defaults. - -The following date/time options are **not** part of the default registry. -Implementations SHOULD avoid creating options that conflict with these, but -are encouraged to track development of these options during Tech Preview: -- `calendar` (default is locale-specific) - - valid [Unicode Calendar Identifier](https://cldr-smoke.unicode.org/spec/main/ldml/tr35.html#UnicodeCalendarIdentifier) -- `numberingSystem` (default is locale-specific) - - valid [Unicode Number System Identifier](https://cldr-smoke.unicode.org/spec/main/ldml/tr35.html#UnicodeNumberSystemIdentifier) -- `timeZone` (default is system default time zone or UTC) - - valid identifier per [BCP175](https://www.rfc-editor.org/rfc/rfc6557) - #### Resolved Value The _resolved value_ of an _expression_ with a `:datetime` _function_ @@ -980,6 +963,7 @@ The function `:date` has these _options_: - `long` - `medium` (default) - `short` +- _Date/time override options_ If the _operand_ of the _expression_ is an implementation-defined date/time type, it can include other option values. @@ -1017,6 +1001,7 @@ The function `:time` has these _options_: - `long` - `medium` - `short` (default) +- _Date/time override options_ If the _operand_ of the _expression_ is an implementation-defined date/time type, it can include other option values. @@ -1080,3 +1065,31 @@ For more information, see [Working with Timezones](https://w3c.github.io/timezon > The form of these serializations is known and is a de facto standard. > Support for these extensions is expected to be required in the post-tech preview. > See: https://datatracker.ietf.org/doc/draft-ietf-sedate-datetime-extended/ + +### Date and Time Override Options + +**_Date/time override options_** are _options_ that allow an _expression_ to +override values set by the current locale, +or provided by the _formatting context_ (such as the default time zone), +or embedded in an implementation-defined date/time _operand_ value. + +The following **standard** option and its values MUST be available on +the functions `:datetime` and `:time`: + +- `hour12` + - `true` + - `false` + +The following **optional** options and their values SHOULD be available on +the functions `:datetime`, `:date`, and `:time`: + +- `calendar` + - valid [Unicode Calendar Identifier](https://cldr-smoke.unicode.org/spec/main/ldml/tr35.html#UnicodeCalendarIdentifier) +- `numberingSystem` + - valid [Unicode Number System Identifier](https://cldr-smoke.unicode.org/spec/main/ldml/tr35.html#UnicodeNumberSystemIdentifier) +- `timeZone` + - valid identifier per [BCP175](https://www.rfc-editor.org/rfc/rfc6557) + +> [!NOTE] +> These options do not have default values because they are only to be used +> as overrides for locale-and-value dependent implementation-defined defaults.