|
1 | 1 | {
|
| 2 | + "date": [ |
| 3 | + { "src": "{:date}", "exp": "{:date}", "errors": [{ "type": "bad-input" }] }, |
| 4 | + { |
| 5 | + "src": "{horse :date}", |
| 6 | + "exp": "{|horse|}", |
| 7 | + "errors": [{ "name": "RangeError" }] |
| 8 | + }, |
| 9 | + { "src": "{|2006-01-02| :date}", "exp": "1/2/06" }, |
| 10 | + { "src": "{|2006-01-02T15:04:06| :date}", "exp": "1/2/06" }, |
| 11 | + { "src": "{|2006-01-02| :date style=long}", "exp": "January 2, 2006" }, |
| 12 | + { |
| 13 | + "src": ".local $d = {|2006-01-02| :date style=long} {{{$d :date}}}", |
| 14 | + "exp": "January 2, 2006" |
| 15 | + }, |
| 16 | + { |
| 17 | + "src": ".local $t = {|2006-01-02T15:04:06| :time} {{{$t :date}}}", |
| 18 | + "exp": "1/2/06" |
| 19 | + } |
| 20 | + ], |
| 21 | + "time": [ |
| 22 | + { "src": "{:time}", "exp": "{:time}", "errors": [{ "type": "bad-input" }] }, |
| 23 | + { |
| 24 | + "src": "{horse :time}", |
| 25 | + "exp": "{|horse|}", |
| 26 | + "errors": [{ "name": "RangeError" }] |
| 27 | + }, |
| 28 | + { "src": "{|2006-01-02T15:04:06| :time}", "exp": "3:04 PM" }, |
| 29 | + { |
| 30 | + "src": "{|2006-01-02T15:04:06| :time style=medium}", |
| 31 | + "exp": "3:04:06 PM" |
| 32 | + }, |
| 33 | + { |
| 34 | + "src": ".local $t = {|2006-01-02T15:04:06| :time style=medium} {{{$t :time}}}", |
| 35 | + "exp": "3:04:06 PM" |
| 36 | + }, |
| 37 | + { |
| 38 | + "src": ".local $d = {|2006-01-02T15:04:06| :date} {{{$d :time}}}", |
| 39 | + "exp": "3:04 PM" |
| 40 | + } |
| 41 | + ], |
| 42 | + "datetime": [ |
| 43 | + { |
| 44 | + "src": "{:datetime}", |
| 45 | + "exp": "{:datetime}", |
| 46 | + "errors": [{ "type": "bad-input" }] |
| 47 | + }, |
| 48 | + { |
| 49 | + "src": "{$x :datetime}", |
| 50 | + "exp": "{$x}", |
| 51 | + "params": { "x": true }, |
| 52 | + "errors": [{ "type": "bad-input" }] |
| 53 | + }, |
| 54 | + { |
| 55 | + "src": "{horse :datetime}", |
| 56 | + "exp": "{|horse|}", |
| 57 | + "errors": [{ "name": "RangeError" }] |
| 58 | + }, |
| 59 | + { "src": "{|2006-01-02T15:04:06| :datetime}", "exp": "1/2/06, 3:04 PM" }, |
| 60 | + { |
| 61 | + "src": "{|2006-01-02T15:04:06| :datetime year=numeric month=|2-digit|}", |
| 62 | + "exp": "01/2006" |
| 63 | + }, |
| 64 | + { |
| 65 | + "src": "{|2006-01-02T15:04:06| :datetime dateStyle=long}", |
| 66 | + "exp": "January 2, 2006" |
| 67 | + }, |
| 68 | + { |
| 69 | + "src": "{|2006-01-02T15:04:06| :datetime timeStyle=medium}", |
| 70 | + "exp": "3:04:06 PM" |
| 71 | + }, |
| 72 | + { |
| 73 | + "src": "{$dt :datetime}", |
| 74 | + "params": { "dt": "2006-01-02T15:04:06" }, |
| 75 | + "exp": "1/2/06, 3:04 PM" |
| 76 | + }, |
| 77 | + { |
| 78 | + "src": ".input {$dt :time style=medium} {{{$dt :datetime dateStyle=long}}}", |
| 79 | + "params": { "dt": "2006-01-02T15:04:06" }, |
| 80 | + "exp": "January 2, 2006 at 3:04:06 PM" |
| 81 | + } |
| 82 | + ], |
2 | 83 | "integer": [
|
3 | 84 | { "src": "hello {4.2 :integer}", "exp": "hello 4" },
|
4 | 85 | { "src": "hello {-4.20 :integer}", "exp": "hello -4" },
|
|
194 | 275 | {
|
195 | 276 | "src": ".match {$foo :ordinal} one {{st}} two {{nd}} few {{rd}} * {{th}}",
|
196 | 277 | "params": { "foo": 1 },
|
197 |
| - "exp": "st" |
198 |
| - }, |
199 |
| - { |
200 |
| - "src": ".match {$foo :ordinal} one {{st}} two {{nd}} few {{rd}} * {{th}}", |
201 |
| - "params": { "foo": 2 }, |
202 |
| - "exp": "nd" |
203 |
| - }, |
204 |
| - { |
205 |
| - "src": ".match {$foo :ordinal} one {{st}} two {{nd}} few {{rd}} * {{th}}", |
206 |
| - "params": { "foo": 3 }, |
207 |
| - "exp": "rd" |
208 |
| - }, |
209 |
| - { |
210 |
| - "src": ".match {$foo :ordinal} one {{st}} two {{nd}} few {{rd}} * {{th}}", |
211 |
| - "params": { "foo": 4 }, |
212 |
| - "exp": "th" |
| 278 | + "exp": "th", |
| 279 | + "errors": [{ "type": "missing-func" }, { "type": "not-selectable" }] |
213 | 280 | },
|
214 | 281 | {
|
215 | 282 | "src": "hello {42 :ordinal}",
|
216 | 283 | "exp": "hello {|42|}",
|
217 |
| - "errors": [{ "type": "not-formattable" }] |
| 284 | + "errors": [{ "type": "missing-func" }] |
218 | 285 | }
|
219 | 286 | ],
|
220 | 287 | "plural": [
|
221 | 288 | {
|
222 | 289 | "src": ".match {$foo :plural} one {{one}} * {{other}}",
|
223 | 290 | "params": { "foo": 1 },
|
224 |
| - "exp": "one" |
225 |
| - }, |
226 |
| - { |
227 |
| - "src": ".match {$foo :plural} one {{one}} * {{other}}", |
228 |
| - "params": { "foo": 1.1 }, |
229 |
| - "exp": "other" |
| 291 | + "exp": "other", |
| 292 | + "errors": [{ "type": "missing-func" }, { "type": "not-selectable" }] |
230 | 293 | },
|
231 | 294 | {
|
232 | 295 | "src": "hello {42 :plural}",
|
233 | 296 | "exp": "hello {|42|}",
|
234 |
| - "errors": [{ "type": "not-formattable" }] |
| 297 | + "errors": [{ "type": "missing-func" }] |
235 | 298 | }
|
236 | 299 | ],
|
237 | 300 | "string": [
|
|
0 commit comments