8000 Restrict literals for `:date` and `:time` · Issue #680 · unicode-org/message-format-wg · GitHub
[go: up one dir, main page]

Skip to content
Restrict literals for :date and :time #680
Open
@eemeli

Description

@eemeli

This is a spin-off from #665, which conflates this issue's nominal topic with a discussion of the timeZone options. The text below is an extract of the original by @aphillips.


@eemeli noted that some literal values don't make sense with some of the date/time functions. Notably date literal with :time or time literal with :date.

In LDML45, I propose:

  • :datetime accepts XMLSchema date, time, and dateTime types as literal operands.
  • :date accepts date and dateTime
  • :time accepts time and dateTime

Note that not accepting all three types on all three functions makes for potential issues with declarations, since the temporal value would be rejected instead of passed to later calls. Examples:

.local $date = {|2024-02-17| :datetime} // don't blow up!
{{Today is {$date}.}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    LDML48LDML48 ReleasefunctionsIssue pertains to the default function set

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0