Skip to content

Commit 54fa33e

Browse files
committed
Make :date and :time composition implementation-defined
1 parent 93d0794 commit 54fa33e

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

spec/registry.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -742,9 +742,9 @@ as is any `style` option.
742742
743743
When an _operand_ or an _option_ value uses a _variable_ annotated,
744744
directly or indirectly, by a `:date` _annotation_,
745-
its _resolved value_ contains the implementation-defined date/time value
746-
of the _operand_ of the annotated _expression_ (with no time value),
747-
together with the resolved options values.
745+
its _resolved value_ is implementation-defined.
746+
An implementation MAY emit a _Bad Operand_ or _Bad Option_ error (as appropriate)
747+
when this happens.
748748
749749
### The `:time` function
750750
@@ -778,12 +778,9 @@ as is any `style` option.
778778
779779
When an _operand_ or an _option_ value uses a _variable_ annotated,
780780
directly or indirectly, by a `:time` _annotation_,
781-
its _resolved value_ contains the implementation-defined date/time value
782-
of the _operand_ of the annotated _expression_ (with no date value),
783-
together with the resolved options values.
784-
785-
Using a `:time` annotated value as the _operand_ of `:datetime` or `:date`
786-
produces a _Bad Operand_ error as it contains no date value.
781+
its _resolved value_ is implementation-defined.
782+
An implementation MAY emit a _Bad Operand_ or _Bad Option_ error (as appropriate)
783+
when this happens.
787784
788785
### Date and Time Operands
789786

test/tests/functions/date.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
"src": "{|2006-01-02| :date style=long}"
3636
},
3737
{
38-
"src": ".local $d = {|2006-01-02| :date style=long} {{{$d :date}}}"
38+
"src": ".local $d = {|2006-01-02| :date style=long} {{{$d}}}"
3939
},
4040
{
41-
"src": ".local $t = {|2006-01-02T15:04:06| :time} {{{$t :date}}}"
41+
"src": ".local $d = {|2006-01-02| :datetime dateStyle=long timeStyle=long} {{{$d :date}}}"
4242
}
4343
]
4444
}

test/tests/functions/time.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
"src": "{|2006-01-02T15:04:06| :time style=medium}"
3333
},
3434
{
35-
"src": ".local $t = {|2006-01-02T15:04:06| :time style=medium} {{{$t :time}}}"
35+
"src": ".local $t = {|2006-01-02T15:04:06| :time style=medium} {{{$t}}}"
3636
},
3737
{
38-
"src": ".local $d = {|2006-01-02T15:04:06| :date} {{{$d :time}}}"
38+
"src": ".local $t = {|2006-01-02T15:04:06| :datetime dateStyle=long timeStyle=long} {{{$t :time}}}"
3939
}
4040
]
4141
}

0 commit comments

Comments
 (0)