cldr
Version:
Library for extracting data from CLDR (the Unicode Common Locale Data Repository)
46 lines (45 loc) • 983 B
JSON
{
"$schema": "https://raw.githubusercontent.com/unicode-org/message-format-wg/main/test/schemas/v0/tests.schema.json",
"scenario": "Date function",
"description": "The built-in formatter for dates.",
"defaultTestProperties": {
"bidiIsolation": "none",
"locale": "en-US",
"expErrors": false
},
"tests": [
{
"src": "{:date}",
"exp": "{:date}",
"expErrors": [
{
"type": "bad-operand"
}
]
},
{
"src": "{horse :date}",
"exp": "{|horse|}",
"expErrors": [
{
"type": "bad-operand"
}
]
},
{
"src": "{|2006-01-02| :date}"
},
{
"src": "{|2006-01-02T15:04:06| :date}"
},
{
"src": "{|2006-01-02| :date style=long}"
},
{
"src": ".local $d = {|2006-01-02| :date style=long} {{{$d}}}"
},
{
"src": ".local $d = {|2006-01-02| :datetime dateStyle=long timeStyle=long} {{{$d :date}}}"
}
]
}