@curly-message/conformance 1.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +266 -0
- package/bin/conformance.js +37 -0
- package/bin/manifest.js +24 -0
- package/dist/index.d.ts +225 -0
- package/dist/index.js +4 -0
- package/fixtures/comparisons.json +916 -0
- package/fixtures/conversion.json +231 -0
- package/fixtures/escaping-extensions.json +84 -0
- package/fixtures/escaping.json +546 -0
- package/fixtures/extensions.json +826 -0
- package/fixtures/fallback-intl.json +51 -0
- package/fixtures/fallback.json +774 -0
- package/fixtures/grammar.json +875 -0
- package/fixtures/intl.json +3057 -0
- package/fixtures/limits.json +63 -0
- package/fixtures/nesting.json +251 -0
- package/fixtures/reports.json +512 -0
- package/fixtures/resolution.json +742 -0
- package/fixtures/security-extensions.json +52 -0
- package/fixtures/security.json +246 -0
- package/fixtures/whitespace.json +1000 -0
- package/index.json +102 -0
- package/package.json +76 -0
- package/schema/fixture.schema.json +264 -0
|
@@ -0,0 +1,3057 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "curly-message-1",
|
|
3
|
+
"level": "intl",
|
|
4
|
+
"section": "11.2",
|
|
5
|
+
"cases": [
|
|
6
|
+
{
|
|
7
|
+
"id": "intl/locale-none-number",
|
|
8
|
+
"description": "number reached where the caller supplied no locale renders the empty string over a present value and a declared default, and reports missing-locale against the payload.",
|
|
9
|
+
"section": "11.2",
|
|
10
|
+
"message": "[{{v:number; default:D}}]",
|
|
11
|
+
"payload": {
|
|
12
|
+
"v": 10
|
|
13
|
+
},
|
|
14
|
+
"key": "intl.locale-none-number",
|
|
15
|
+
"expected": {
|
|
16
|
+
"output": "[]",
|
|
17
|
+
"reports": [
|
|
18
|
+
{
|
|
19
|
+
"code": "missing-locale",
|
|
20
|
+
"origin": "payload",
|
|
21
|
+
"key": "intl.locale-none-number"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "intl/locale-none-date",
|
|
28
|
+
"description": "date reached where the caller supplied no locale renders the empty string, not the chain, and reports missing-locale.",
|
|
29
|
+
"section": "11.2",
|
|
30
|
+
"message": "[{{v:date; default:D}}]",
|
|
31
|
+
"payload": {
|
|
32
|
+
"v": 1709632800000
|
|
33
|
+
},
|
|
34
|
+
"props": {
|
|
35
|
+
"date": {
|
|
36
|
+
"timeZone": "UTC"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"key": "intl.locale-none-date",
|
|
40
|
+
"expected": {
|
|
41
|
+
"output": "[]",
|
|
42
|
+
"reports": [
|
|
43
|
+
{
|
|
44
|
+
"code": "missing-locale",
|
|
45
|
+
"origin": "payload",
|
|
46
|
+
"key": "intl.locale-none-date"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "intl/locale-none-ago",
|
|
53
|
+
"description": "ago reached where the caller supplied no locale renders the empty string, not the chain, and reports missing-locale.",
|
|
54
|
+
"section": "11.2",
|
|
55
|
+
"message": "[{{v:ago; default:D}}]",
|
|
56
|
+
"payload": {
|
|
57
|
+
"v": -86400000
|
|
58
|
+
},
|
|
59
|
+
"key": "intl.locale-none-ago",
|
|
60
|
+
"expected": {
|
|
61
|
+
"output": "[]",
|
|
62
|
+
"reports": [
|
|
63
|
+
{
|
|
64
|
+
"code": "missing-locale",
|
|
65
|
+
"origin": "payload",
|
|
66
|
+
"key": "intl.locale-none-ago"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "intl/locale-none-currency",
|
|
73
|
+
"description": "currency reached where the caller supplied no locale renders the empty string, not the chain, and reports missing-locale.",
|
|
74
|
+
"section": "11.2",
|
|
75
|
+
"message": "[{{v:currency; default:D}}]",
|
|
76
|
+
"payload": {
|
|
77
|
+
"v": 10
|
|
78
|
+
},
|
|
79
|
+
"props": {
|
|
80
|
+
"currency": {
|
|
81
|
+
"currency": "USD"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"key": "intl.locale-none-currency",
|
|
85
|
+
"expected": {
|
|
86
|
+
"output": "[]",
|
|
87
|
+
"reports": [
|
|
88
|
+
{
|
|
89
|
+
"code": "missing-locale",
|
|
90
|
+
"origin": "payload",
|
|
91
|
+
"key": "intl.locale-none-currency"
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "intl/locale-empty",
|
|
98
|
+
"description": "A locale the caller supplied empty is not available: the empty string, and a missing-locale report against the payload.",
|
|
99
|
+
"section": "11.2",
|
|
100
|
+
"message": "[{{v:number; default:D}}]",
|
|
101
|
+
"payload": {
|
|
102
|
+
"v": 10
|
|
103
|
+
},
|
|
104
|
+
"locale": "",
|
|
105
|
+
"key": "intl.locale-empty",
|
|
106
|
+
"expected": {
|
|
107
|
+
"output": "[]",
|
|
108
|
+
"reports": [
|
|
109
|
+
{
|
|
110
|
+
"code": "missing-locale",
|
|
111
|
+
"origin": "payload",
|
|
112
|
+
"key": "intl.locale-empty"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"id": "intl/locale-none-ignores-every-link",
|
|
119
|
+
"description": "No link of the fallback chain stands in for a locale nobody supplied: a wrapper default and a payload default are both left unread.",
|
|
120
|
+
"section": "11.2",
|
|
121
|
+
"message": "[{{v:number}}]",
|
|
122
|
+
"payload": {
|
|
123
|
+
"v": {
|
|
124
|
+
"value": 10,
|
|
125
|
+
"default": "W"
|
|
126
|
+
},
|
|
127
|
+
"default": "P"
|
|
128
|
+
},
|
|
129
|
+
"key": "intl.locale-none-links",
|
|
130
|
+
"expected": {
|
|
131
|
+
"output": "[]",
|
|
132
|
+
"reports": [
|
|
133
|
+
{
|
|
134
|
+
"code": "missing-locale",
|
|
135
|
+
"origin": "payload",
|
|
136
|
+
"key": "intl.locale-none-links"
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"id": "intl/locale-before-unformattable-value",
|
|
143
|
+
"description": "The locale is tested before the value is read, so a value the modifier could not format renders the empty string and reports the locale, not the value.",
|
|
144
|
+
"section": "11.2",
|
|
145
|
+
"message": "[{{v:number; default:D}}]",
|
|
146
|
+
"payload": {
|
|
147
|
+
"v": "not a number"
|
|
148
|
+
},
|
|
149
|
+
"key": "intl.locale-before-value",
|
|
150
|
+
"expected": {
|
|
151
|
+
"output": "[]",
|
|
152
|
+
"reports": [
|
|
153
|
+
{
|
|
154
|
+
"code": "missing-locale",
|
|
155
|
+
"origin": "payload",
|
|
156
|
+
"key": "intl.locale-before-value"
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"id": "intl/locale-before-blank-value",
|
|
163
|
+
"description": "The locale is tested before the value is read, so a blank value renders the empty string and reports the locale, not a failed modifier.",
|
|
164
|
+
"section": "11.2",
|
|
165
|
+
"message": "[{{v:number; default:D}}]",
|
|
166
|
+
"payload": {
|
|
167
|
+
"v": ""
|
|
168
|
+
},
|
|
169
|
+
"key": "intl.locale-before-blank",
|
|
170
|
+
"expected": {
|
|
171
|
+
"output": "[]",
|
|
172
|
+
"reports": [
|
|
173
|
+
{
|
|
174
|
+
"code": "missing-locale",
|
|
175
|
+
"origin": "payload",
|
|
176
|
+
"key": "intl.locale-before-blank"
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"id": "intl/absent-value-no-locale",
|
|
183
|
+
"description": "An absent value takes the chain before any modifier is asked, so no missing locale is reported where the caller supplied none.",
|
|
184
|
+
"section": "11.2",
|
|
185
|
+
"message": "{{v:number; default:D}}",
|
|
186
|
+
"payload": {},
|
|
187
|
+
"key": "intl.absent-no-locale",
|
|
188
|
+
"expected": {
|
|
189
|
+
"output": "D",
|
|
190
|
+
"reports": []
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"id": "intl/absent-value-with-locale",
|
|
195
|
+
"description": "An absent value takes the chain before any modifier is asked, and reports nothing where the caller supplied a locale.",
|
|
196
|
+
"section": "11.2",
|
|
197
|
+
"message": "{{v:number; default:D}}",
|
|
198
|
+
"payload": {},
|
|
199
|
+
"locale": "en",
|
|
200
|
+
"key": "intl.absent-with-locale",
|
|
201
|
+
"expected": {
|
|
202
|
+
"output": "D",
|
|
203
|
+
"reports": []
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"id": "intl/undefined-value-no-locale",
|
|
208
|
+
"description": "An entry that is the host's undefined is absent, so the placeholder takes the chain and no missing locale is reported.",
|
|
209
|
+
"section": "11.2",
|
|
210
|
+
"message": "{{v:number; default:D}}",
|
|
211
|
+
"payload": {
|
|
212
|
+
"v": {
|
|
213
|
+
"$curly": "undefined"
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"key": "intl.undefined-no-locale",
|
|
217
|
+
"expected": {
|
|
218
|
+
"output": "D",
|
|
219
|
+
"reports": []
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"id": "intl/number-formats",
|
|
224
|
+
"description": "number formats a locale-formatted number with at most two fraction digits where no layer names a maximum.",
|
|
225
|
+
"section": "11.2",
|
|
226
|
+
"message": "{{n:number}}",
|
|
227
|
+
"payload": {
|
|
228
|
+
"n": 1234.5678
|
|
229
|
+
},
|
|
230
|
+
"locale": "en",
|
|
231
|
+
"expected": {
|
|
232
|
+
"format": {
|
|
233
|
+
"api": "NumberFormat",
|
|
234
|
+
"options": {
|
|
235
|
+
"maximumFractionDigits": 2
|
|
236
|
+
},
|
|
237
|
+
"input": 1234.5678
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"id": "intl/number-locale-is-the-callers",
|
|
243
|
+
"description": "The locale the facility formats in is the one the caller supplied.",
|
|
244
|
+
"section": "11.2",
|
|
245
|
+
"message": "{{n:number}}",
|
|
246
|
+
"payload": {
|
|
247
|
+
"n": 1234.5
|
|
248
|
+
},
|
|
249
|
+
"locale": "cs",
|
|
250
|
+
"expected": {
|
|
251
|
+
"format": {
|
|
252
|
+
"api": "NumberFormat",
|
|
253
|
+
"options": {
|
|
254
|
+
"maximumFractionDigits": 2
|
|
255
|
+
},
|
|
256
|
+
"input": 1234.5
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"id": "intl/number-text-value",
|
|
262
|
+
"description": "A number authored as text is the same number, since every value arrives as text.",
|
|
263
|
+
"section": "11.2",
|
|
264
|
+
"message": "{{n:number}}",
|
|
265
|
+
"payload": {
|
|
266
|
+
"n": "1234.5678"
|
|
267
|
+
},
|
|
268
|
+
"locale": "en",
|
|
269
|
+
"expected": {
|
|
270
|
+
"format": {
|
|
271
|
+
"api": "NumberFormat",
|
|
272
|
+
"options": {
|
|
273
|
+
"maximumFractionDigits": 2
|
|
274
|
+
},
|
|
275
|
+
"input": 1234.5678
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"id": "intl/date-timestamp",
|
|
281
|
+
"description": "date formats milliseconds since the Unix epoch.",
|
|
282
|
+
"section": "11.2",
|
|
283
|
+
"message": "{{d:date}}",
|
|
284
|
+
"payload": {
|
|
285
|
+
"d": 1709632800000
|
|
286
|
+
},
|
|
287
|
+
"props": {
|
|
288
|
+
"date": {
|
|
289
|
+
"timeZone": "UTC"
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"locale": "en",
|
|
293
|
+
"expected": {
|
|
294
|
+
"format": {
|
|
295
|
+
"api": "DateTimeFormat",
|
|
296
|
+
"options": {
|
|
297
|
+
"timeZone": "UTC"
|
|
298
|
+
},
|
|
299
|
+
"input": 1709632800000
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"id": "intl/date-parsed-text",
|
|
305
|
+
"description": "date hands text that is not a number to the host's date parsing, so an ISO date-time with an explicit zone formats the instant it names.",
|
|
306
|
+
"section": "11.2",
|
|
307
|
+
"message": "{{d:date}}",
|
|
308
|
+
"payload": {
|
|
309
|
+
"d": "2024-03-05T10:00:00.000Z"
|
|
310
|
+
},
|
|
311
|
+
"props": {
|
|
312
|
+
"date": {
|
|
313
|
+
"timeZone": "UTC"
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"locale": "en",
|
|
317
|
+
"expected": {
|
|
318
|
+
"format": {
|
|
319
|
+
"api": "DateTimeFormat",
|
|
320
|
+
"options": {
|
|
321
|
+
"timeZone": "UTC"
|
|
322
|
+
},
|
|
323
|
+
"input": 1709632800000
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"id": "intl/date-locale-is-the-callers",
|
|
329
|
+
"description": "date formats in the locale the caller supplied.",
|
|
330
|
+
"section": "11.2",
|
|
331
|
+
"message": "{{d:date}}",
|
|
332
|
+
"payload": {
|
|
333
|
+
"d": 1709632800000
|
|
334
|
+
},
|
|
335
|
+
"props": {
|
|
336
|
+
"date": {
|
|
337
|
+
"timeZone": "UTC",
|
|
338
|
+
"dateStyle": "long"
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"locale": "de",
|
|
342
|
+
"expected": {
|
|
343
|
+
"format": {
|
|
344
|
+
"api": "DateTimeFormat",
|
|
345
|
+
"options": {
|
|
346
|
+
"timeZone": "UTC",
|
|
347
|
+
"dateStyle": "long"
|
|
348
|
+
},
|
|
349
|
+
"input": 1709632800000
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"id": "intl/ago-negative-is-past",
|
|
355
|
+
"description": "ago reads a signed millisecond delta, negative for the past.",
|
|
356
|
+
"section": "11.2",
|
|
357
|
+
"message": "{{t:ago}}",
|
|
358
|
+
"payload": {
|
|
359
|
+
"t": -1200000
|
|
360
|
+
},
|
|
361
|
+
"locale": "en",
|
|
362
|
+
"expected": {
|
|
363
|
+
"format": {
|
|
364
|
+
"api": "RelativeTimeFormat",
|
|
365
|
+
"options": {
|
|
366
|
+
"numeric": "auto"
|
|
367
|
+
},
|
|
368
|
+
"input": [
|
|
369
|
+
-20,
|
|
370
|
+
"minute"
|
|
371
|
+
]
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"id": "intl/ago-positive-is-future",
|
|
377
|
+
"description": "ago reads a positive delta as the future.",
|
|
378
|
+
"section": "11.2",
|
|
379
|
+
"message": "{{t:ago}}",
|
|
380
|
+
"payload": {
|
|
381
|
+
"t": 1200000
|
|
382
|
+
},
|
|
383
|
+
"locale": "en",
|
|
384
|
+
"expected": {
|
|
385
|
+
"format": {
|
|
386
|
+
"api": "RelativeTimeFormat",
|
|
387
|
+
"options": {
|
|
388
|
+
"numeric": "auto"
|
|
389
|
+
},
|
|
390
|
+
"input": [
|
|
391
|
+
20,
|
|
392
|
+
"minute"
|
|
393
|
+
]
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"id": "intl/ago-locale-is-the-callers",
|
|
399
|
+
"description": "ago formats in the locale the caller supplied.",
|
|
400
|
+
"section": "11.2",
|
|
401
|
+
"message": "{{t:ago}}",
|
|
402
|
+
"payload": {
|
|
403
|
+
"t": -1200000
|
|
404
|
+
},
|
|
405
|
+
"locale": "cs",
|
|
406
|
+
"expected": {
|
|
407
|
+
"format": {
|
|
408
|
+
"api": "RelativeTimeFormat",
|
|
409
|
+
"options": {
|
|
410
|
+
"numeric": "auto"
|
|
411
|
+
},
|
|
412
|
+
"input": [
|
|
413
|
+
-20,
|
|
414
|
+
"minute"
|
|
415
|
+
]
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"id": "intl/currency-ratio-defaults-to-one",
|
|
421
|
+
"description": "currency multiplies its value by a ratio defaulting to 1 and formats a currency amount.",
|
|
422
|
+
"section": "11.2",
|
|
423
|
+
"message": "{{v:currency}}",
|
|
424
|
+
"payload": {
|
|
425
|
+
"v": 2
|
|
426
|
+
},
|
|
427
|
+
"props": {
|
|
428
|
+
"currency": {
|
|
429
|
+
"currency": "USD"
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
"locale": "en",
|
|
433
|
+
"expected": {
|
|
434
|
+
"format": {
|
|
435
|
+
"api": "NumberFormat",
|
|
436
|
+
"options": {
|
|
437
|
+
"style": "currency",
|
|
438
|
+
"currency": "USD"
|
|
439
|
+
},
|
|
440
|
+
"input": 2
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"id": "intl/currency-ratio",
|
|
446
|
+
"description": "currency multiplies its value by the ratio a layer names before formatting.",
|
|
447
|
+
"section": "11.2",
|
|
448
|
+
"message": "{{v:currency}}",
|
|
449
|
+
"payload": {
|
|
450
|
+
"v": 2
|
|
451
|
+
},
|
|
452
|
+
"props": {
|
|
453
|
+
"currency": {
|
|
454
|
+
"currency": "USD",
|
|
455
|
+
"ratio": 100
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
"locale": "en",
|
|
459
|
+
"expected": {
|
|
460
|
+
"format": {
|
|
461
|
+
"api": "NumberFormat",
|
|
462
|
+
"options": {
|
|
463
|
+
"style": "currency",
|
|
464
|
+
"currency": "USD"
|
|
465
|
+
},
|
|
466
|
+
"input": 200
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"id": "intl/currency-locale-is-the-callers",
|
|
472
|
+
"description": "currency formats in the locale the caller supplied.",
|
|
473
|
+
"section": "11.2",
|
|
474
|
+
"message": "{{v:currency}}",
|
|
475
|
+
"payload": {
|
|
476
|
+
"v": 200
|
|
477
|
+
},
|
|
478
|
+
"props": {
|
|
479
|
+
"currency": {
|
|
480
|
+
"currency": "EUR"
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
"locale": "de",
|
|
484
|
+
"expected": {
|
|
485
|
+
"format": {
|
|
486
|
+
"api": "NumberFormat",
|
|
487
|
+
"options": {
|
|
488
|
+
"style": "currency",
|
|
489
|
+
"currency": "EUR"
|
|
490
|
+
},
|
|
491
|
+
"input": 200
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
"id": "intl/number-rejects-date-text",
|
|
497
|
+
"description": "number takes a number only: date text takes the chain with a failed-modifier report.",
|
|
498
|
+
"section": "11.2",
|
|
499
|
+
"message": "{{v:number; default:D}}",
|
|
500
|
+
"payload": {
|
|
501
|
+
"v": "2024-03-05T10:00:00.000Z"
|
|
502
|
+
},
|
|
503
|
+
"locale": "en",
|
|
504
|
+
"key": "intl.number-date-text",
|
|
505
|
+
"expected": {
|
|
506
|
+
"output": "D",
|
|
507
|
+
"reports": [
|
|
508
|
+
{
|
|
509
|
+
"code": "failed-modifier",
|
|
510
|
+
"origin": "payload",
|
|
511
|
+
"key": "intl.number-date-text"
|
|
512
|
+
}
|
|
513
|
+
]
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"id": "intl/ago-rejects-date-text",
|
|
518
|
+
"description": "ago takes a number only: date text takes the chain with a failed-modifier report.",
|
|
519
|
+
"section": "11.2",
|
|
520
|
+
"message": "{{v:ago; default:D}}",
|
|
521
|
+
"payload": {
|
|
522
|
+
"v": "2024-03-05T10:00:00.000Z"
|
|
523
|
+
},
|
|
524
|
+
"locale": "en",
|
|
525
|
+
"key": "intl.ago-date-text",
|
|
526
|
+
"expected": {
|
|
527
|
+
"output": "D",
|
|
528
|
+
"reports": [
|
|
529
|
+
{
|
|
530
|
+
"code": "failed-modifier",
|
|
531
|
+
"origin": "payload",
|
|
532
|
+
"key": "intl.ago-date-text"
|
|
533
|
+
}
|
|
534
|
+
]
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"id": "intl/currency-rejects-date-text",
|
|
539
|
+
"description": "currency takes a number only: date text takes the chain with a failed-modifier report.",
|
|
540
|
+
"section": "11.2",
|
|
541
|
+
"message": "{{v:currency; default:D}}",
|
|
542
|
+
"payload": {
|
|
543
|
+
"v": "2024-03-05T10:00:00.000Z"
|
|
544
|
+
},
|
|
545
|
+
"props": {
|
|
546
|
+
"currency": {
|
|
547
|
+
"currency": "USD"
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
"locale": "en",
|
|
551
|
+
"key": "intl.currency-date-text",
|
|
552
|
+
"expected": {
|
|
553
|
+
"output": "D",
|
|
554
|
+
"reports": [
|
|
555
|
+
{
|
|
556
|
+
"code": "failed-modifier",
|
|
557
|
+
"origin": "payload",
|
|
558
|
+
"key": "intl.currency-date-text"
|
|
559
|
+
}
|
|
560
|
+
]
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"id": "intl/number-nope-renders-nothing",
|
|
565
|
+
"description": "number over text that is not a number takes the chain, which is empty, and reports failed-modifier, as Appendix A.13 shows.",
|
|
566
|
+
"section": "11.2",
|
|
567
|
+
"message": "{{v:number}}",
|
|
568
|
+
"payload": {
|
|
569
|
+
"v": "nope"
|
|
570
|
+
},
|
|
571
|
+
"locale": "en",
|
|
572
|
+
"key": "intl.number-nope",
|
|
573
|
+
"expected": {
|
|
574
|
+
"output": "",
|
|
575
|
+
"reports": [
|
|
576
|
+
{
|
|
577
|
+
"code": "failed-modifier",
|
|
578
|
+
"origin": "payload",
|
|
579
|
+
"key": "intl.number-nope"
|
|
580
|
+
}
|
|
581
|
+
]
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
"id": "intl/number-nope-takes-default",
|
|
586
|
+
"description": "number over text that is not a number takes the declared default as text and does not convert it, as Appendix A.13 shows.",
|
|
587
|
+
"section": "11.2",
|
|
588
|
+
"message": "{{v:number; default:n/a}}",
|
|
589
|
+
"payload": {
|
|
590
|
+
"v": "nope"
|
|
591
|
+
},
|
|
592
|
+
"locale": "en",
|
|
593
|
+
"key": "intl.number-nope-default",
|
|
594
|
+
"expected": {
|
|
595
|
+
"output": "n/a",
|
|
596
|
+
"reports": [
|
|
597
|
+
{
|
|
598
|
+
"code": "failed-modifier",
|
|
599
|
+
"origin": "payload",
|
|
600
|
+
"key": "intl.number-nope-default"
|
|
601
|
+
}
|
|
602
|
+
]
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
"id": "intl/ago-nope-renders-nothing",
|
|
607
|
+
"description": "ago over text that is not a number takes the chain, which is empty, and reports failed-modifier, as Appendix A.13 shows.",
|
|
608
|
+
"section": "11.2",
|
|
609
|
+
"message": "{{v:ago}}",
|
|
610
|
+
"payload": {
|
|
611
|
+
"v": "nope"
|
|
612
|
+
},
|
|
613
|
+
"locale": "en",
|
|
614
|
+
"key": "intl.ago-nope",
|
|
615
|
+
"expected": {
|
|
616
|
+
"output": "",
|
|
617
|
+
"reports": [
|
|
618
|
+
{
|
|
619
|
+
"code": "failed-modifier",
|
|
620
|
+
"origin": "payload",
|
|
621
|
+
"key": "intl.ago-nope"
|
|
622
|
+
}
|
|
623
|
+
]
|
|
624
|
+
}
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
"id": "intl/currency-nope-renders-nothing",
|
|
628
|
+
"description": "currency over text that is not a number takes the chain, which is empty, and reports failed-modifier, as Appendix A.13 shows.",
|
|
629
|
+
"section": "11.2",
|
|
630
|
+
"message": "{{v:currency}}",
|
|
631
|
+
"payload": {
|
|
632
|
+
"v": "nope"
|
|
633
|
+
},
|
|
634
|
+
"props": {
|
|
635
|
+
"currency": {
|
|
636
|
+
"currency": "USD"
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
"locale": "en",
|
|
640
|
+
"key": "intl.currency-nope",
|
|
641
|
+
"expected": {
|
|
642
|
+
"output": "",
|
|
643
|
+
"reports": [
|
|
644
|
+
{
|
|
645
|
+
"code": "failed-modifier",
|
|
646
|
+
"origin": "payload",
|
|
647
|
+
"key": "intl.currency-nope"
|
|
648
|
+
}
|
|
649
|
+
]
|
|
650
|
+
}
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
"id": "intl/number-empty-renders-nothing",
|
|
654
|
+
"description": "number over empty text takes the chain, which is empty, and reports failed-modifier, as Appendix A.13 shows.",
|
|
655
|
+
"section": "11.2",
|
|
656
|
+
"message": "{{v:number}}",
|
|
657
|
+
"payload": {
|
|
658
|
+
"v": ""
|
|
659
|
+
},
|
|
660
|
+
"locale": "en",
|
|
661
|
+
"key": "intl.number-empty",
|
|
662
|
+
"expected": {
|
|
663
|
+
"output": "",
|
|
664
|
+
"reports": [
|
|
665
|
+
{
|
|
666
|
+
"code": "failed-modifier",
|
|
667
|
+
"origin": "payload",
|
|
668
|
+
"key": "intl.number-empty"
|
|
669
|
+
}
|
|
670
|
+
]
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
"id": "intl/date-empty-renders-nothing",
|
|
675
|
+
"description": "date over empty text takes the chain, which is empty, and reports failed-modifier, as Appendix A.13 shows.",
|
|
676
|
+
"section": "11.2",
|
|
677
|
+
"message": "{{v:date}}",
|
|
678
|
+
"payload": {
|
|
679
|
+
"v": ""
|
|
680
|
+
},
|
|
681
|
+
"locale": "en",
|
|
682
|
+
"key": "intl.date-empty",
|
|
683
|
+
"expected": {
|
|
684
|
+
"output": "",
|
|
685
|
+
"reports": [
|
|
686
|
+
{
|
|
687
|
+
"code": "failed-modifier",
|
|
688
|
+
"origin": "payload",
|
|
689
|
+
"key": "intl.date-empty"
|
|
690
|
+
}
|
|
691
|
+
]
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
"id": "intl/blank-empty-number",
|
|
696
|
+
"description": "Empty text is not a number whatever the host's conversion makes of it: number takes the chain and reports failed-modifier.",
|
|
697
|
+
"section": "11.2",
|
|
698
|
+
"message": "{{v:number; default:D}}",
|
|
699
|
+
"payload": {
|
|
700
|
+
"v": ""
|
|
701
|
+
},
|
|
702
|
+
"locale": "en",
|
|
703
|
+
"key": "intl.blank-empty-number",
|
|
704
|
+
"expected": {
|
|
705
|
+
"output": "D",
|
|
706
|
+
"reports": [
|
|
707
|
+
{
|
|
708
|
+
"code": "failed-modifier",
|
|
709
|
+
"origin": "payload",
|
|
710
|
+
"key": "intl.blank-empty-number"
|
|
711
|
+
}
|
|
712
|
+
]
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"id": "intl/blank-empty-date",
|
|
717
|
+
"description": "Empty text is not a date either: date takes the chain rather than formatting the epoch.",
|
|
718
|
+
"section": "11.2",
|
|
719
|
+
"message": "{{v:date; default:D}}",
|
|
720
|
+
"payload": {
|
|
721
|
+
"v": ""
|
|
722
|
+
},
|
|
723
|
+
"props": {
|
|
724
|
+
"date": {
|
|
725
|
+
"timeZone": "UTC"
|
|
726
|
+
}
|
|
727
|
+
},
|
|
728
|
+
"locale": "en",
|
|
729
|
+
"key": "intl.blank-empty-date",
|
|
730
|
+
"expected": {
|
|
731
|
+
"output": "D",
|
|
732
|
+
"reports": [
|
|
733
|
+
{
|
|
734
|
+
"code": "failed-modifier",
|
|
735
|
+
"origin": "payload",
|
|
736
|
+
"key": "intl.blank-empty-date"
|
|
737
|
+
}
|
|
738
|
+
]
|
|
739
|
+
}
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"id": "intl/blank-empty-ago",
|
|
743
|
+
"description": "Empty text is not a number: ago takes the chain rather than formatting a count of zero.",
|
|
744
|
+
"section": "11.2",
|
|
745
|
+
"message": "{{v:ago; default:D}}",
|
|
746
|
+
"payload": {
|
|
747
|
+
"v": ""
|
|
748
|
+
},
|
|
749
|
+
"locale": "en",
|
|
750
|
+
"key": "intl.blank-empty-ago",
|
|
751
|
+
"expected": {
|
|
752
|
+
"output": "D",
|
|
753
|
+
"reports": [
|
|
754
|
+
{
|
|
755
|
+
"code": "failed-modifier",
|
|
756
|
+
"origin": "payload",
|
|
757
|
+
"key": "intl.blank-empty-ago"
|
|
758
|
+
}
|
|
759
|
+
]
|
|
760
|
+
}
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"id": "intl/blank-empty-currency",
|
|
764
|
+
"description": "Empty text is not a number: currency takes the chain rather than formatting a zero amount.",
|
|
765
|
+
"section": "11.2",
|
|
766
|
+
"message": "{{v:currency; default:D}}",
|
|
767
|
+
"payload": {
|
|
768
|
+
"v": ""
|
|
769
|
+
},
|
|
770
|
+
"props": {
|
|
771
|
+
"currency": {
|
|
772
|
+
"currency": "USD"
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
"locale": "en",
|
|
776
|
+
"key": "intl.blank-empty-currency",
|
|
777
|
+
"expected": {
|
|
778
|
+
"output": "D",
|
|
779
|
+
"reports": [
|
|
780
|
+
{
|
|
781
|
+
"code": "failed-modifier",
|
|
782
|
+
"origin": "payload",
|
|
783
|
+
"key": "intl.blank-empty-currency"
|
|
784
|
+
}
|
|
785
|
+
]
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
"id": "intl/blank-whitespace-number",
|
|
790
|
+
"description": "Text of only whitespace of section 6's class, members outside ASCII included, is not a number: number takes the chain.",
|
|
791
|
+
"section": "11.2",
|
|
792
|
+
"message": "{{v:number; default:D}}",
|
|
793
|
+
"payload": {
|
|
794
|
+
"v": "\u00a0\u3000\ufeff"
|
|
795
|
+
},
|
|
796
|
+
"locale": "en",
|
|
797
|
+
"key": "intl.blank-whitespace-number",
|
|
798
|
+
"expected": {
|
|
799
|
+
"output": "D",
|
|
800
|
+
"reports": [
|
|
801
|
+
{
|
|
802
|
+
"code": "failed-modifier",
|
|
803
|
+
"origin": "payload",
|
|
804
|
+
"key": "intl.blank-whitespace-number"
|
|
805
|
+
}
|
|
806
|
+
]
|
|
807
|
+
}
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
"id": "intl/blank-whitespace-date",
|
|
811
|
+
"description": "Text of only whitespace of section 6's class is not a date: date takes the chain.",
|
|
812
|
+
"section": "11.2",
|
|
813
|
+
"message": "{{v:date; default:D}}",
|
|
814
|
+
"payload": {
|
|
815
|
+
"v": "\u00a0\u3000\ufeff"
|
|
816
|
+
},
|
|
817
|
+
"props": {
|
|
818
|
+
"date": {
|
|
819
|
+
"timeZone": "UTC"
|
|
820
|
+
}
|
|
821
|
+
},
|
|
822
|
+
"locale": "en",
|
|
823
|
+
"key": "intl.blank-whitespace-date",
|
|
824
|
+
"expected": {
|
|
825
|
+
"output": "D",
|
|
826
|
+
"reports": [
|
|
827
|
+
{
|
|
828
|
+
"code": "failed-modifier",
|
|
829
|
+
"origin": "payload",
|
|
830
|
+
"key": "intl.blank-whitespace-date"
|
|
831
|
+
}
|
|
832
|
+
]
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
"id": "intl/blank-whitespace-ago",
|
|
837
|
+
"description": "Text of only whitespace of section 6's class is not a number: ago takes the chain.",
|
|
838
|
+
"section": "11.2",
|
|
839
|
+
"message": "{{v:ago; default:D}}",
|
|
840
|
+
"payload": {
|
|
841
|
+
"v": "\u00a0\u3000\ufeff"
|
|
842
|
+
},
|
|
843
|
+
"locale": "en",
|
|
844
|
+
"key": "intl.blank-whitespace-ago",
|
|
845
|
+
"expected": {
|
|
846
|
+
"output": "D",
|
|
847
|
+
"reports": [
|
|
848
|
+
{
|
|
849
|
+
"code": "failed-modifier",
|
|
850
|
+
"origin": "payload",
|
|
851
|
+
"key": "intl.blank-whitespace-ago"
|
|
852
|
+
}
|
|
853
|
+
]
|
|
854
|
+
}
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
"id": "intl/blank-whitespace-currency",
|
|
858
|
+
"description": "Text of only whitespace of section 6's class is not a number: currency takes the chain.",
|
|
859
|
+
"section": "11.2",
|
|
860
|
+
"message": "{{v:currency; default:D}}",
|
|
861
|
+
"payload": {
|
|
862
|
+
"v": "\u00a0\u3000\ufeff"
|
|
863
|
+
},
|
|
864
|
+
"props": {
|
|
865
|
+
"currency": {
|
|
866
|
+
"currency": "USD"
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
"locale": "en",
|
|
870
|
+
"key": "intl.blank-whitespace-currency",
|
|
871
|
+
"expected": {
|
|
872
|
+
"output": "D",
|
|
873
|
+
"reports": [
|
|
874
|
+
{
|
|
875
|
+
"code": "failed-modifier",
|
|
876
|
+
"origin": "payload",
|
|
877
|
+
"key": "intl.blank-whitespace-currency"
|
|
878
|
+
}
|
|
879
|
+
]
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
"id": "intl/number-trailing-text-not-a-number",
|
|
884
|
+
"description": "The conversion reads the whole value and not a leading part, so 12px is not a number and takes the chain.",
|
|
885
|
+
"section": "11.2",
|
|
886
|
+
"message": "{{v:number; default:D}}",
|
|
887
|
+
"payload": {
|
|
888
|
+
"v": "12px"
|
|
889
|
+
},
|
|
890
|
+
"locale": "en",
|
|
891
|
+
"key": "intl.number-12px",
|
|
892
|
+
"expected": {
|
|
893
|
+
"output": "D",
|
|
894
|
+
"reports": [
|
|
895
|
+
{
|
|
896
|
+
"code": "failed-modifier",
|
|
897
|
+
"origin": "payload",
|
|
898
|
+
"key": "intl.number-12px"
|
|
899
|
+
}
|
|
900
|
+
]
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
|
+
"id": "intl/number-surrounding-whitespace",
|
|
905
|
+
"description": "Whitespace around a number is not part of it, so \" 12 \" is a number.",
|
|
906
|
+
"section": "11.2",
|
|
907
|
+
"message": "{{v:number}}",
|
|
908
|
+
"payload": {
|
|
909
|
+
"v": " 12 "
|
|
910
|
+
},
|
|
911
|
+
"locale": "en",
|
|
912
|
+
"expected": {
|
|
913
|
+
"format": {
|
|
914
|
+
"api": "NumberFormat",
|
|
915
|
+
"options": {
|
|
916
|
+
"maximumFractionDigits": 2
|
|
917
|
+
},
|
|
918
|
+
"input": 12
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
"id": "intl/number-signed",
|
|
924
|
+
"description": "A sign is part of a number, so +12 is one.",
|
|
925
|
+
"section": "11.2",
|
|
926
|
+
"message": "{{v:number}}",
|
|
927
|
+
"payload": {
|
|
928
|
+
"v": "+12"
|
|
929
|
+
},
|
|
930
|
+
"locale": "en",
|
|
931
|
+
"expected": {
|
|
932
|
+
"format": {
|
|
933
|
+
"api": "NumberFormat",
|
|
934
|
+
"options": {
|
|
935
|
+
"maximumFractionDigits": 2
|
|
936
|
+
},
|
|
937
|
+
"input": 12
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
"id": "intl/number-exponent",
|
|
943
|
+
"description": "An exponent is part of a number, so 1e3 is one.",
|
|
944
|
+
"section": "11.2",
|
|
945
|
+
"message": "{{v:number}}",
|
|
946
|
+
"payload": {
|
|
947
|
+
"v": "1e3"
|
|
948
|
+
},
|
|
949
|
+
"locale": "en",
|
|
950
|
+
"expected": {
|
|
951
|
+
"format": {
|
|
952
|
+
"api": "NumberFormat",
|
|
953
|
+
"options": {
|
|
954
|
+
"maximumFractionDigits": 2
|
|
955
|
+
},
|
|
956
|
+
"input": 1000
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
"id": "intl/number-infinity",
|
|
962
|
+
"description": "An infinity is not a number a formatting modifier can format, so number over Infinity takes the chain.",
|
|
963
|
+
"section": "11.2",
|
|
964
|
+
"message": "{{v:number; default:D}}",
|
|
965
|
+
"payload": {
|
|
966
|
+
"v": "Infinity"
|
|
967
|
+
},
|
|
968
|
+
"locale": "en",
|
|
969
|
+
"key": "intl.number-infinity",
|
|
970
|
+
"expected": {
|
|
971
|
+
"output": "D",
|
|
972
|
+
"reports": [
|
|
973
|
+
{
|
|
974
|
+
"code": "failed-modifier",
|
|
975
|
+
"origin": "payload",
|
|
976
|
+
"key": "intl.number-infinity"
|
|
977
|
+
}
|
|
978
|
+
]
|
|
979
|
+
}
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
"id": "intl/currency-product-overflows",
|
|
983
|
+
"description": "currency applies the test a second time to the product of value and ratio, so a product that overflows to an infinity takes the chain.",
|
|
984
|
+
"section": "11.2",
|
|
985
|
+
"message": "{{v:currency; default:D}}",
|
|
986
|
+
"payload": {
|
|
987
|
+
"v": 1e+308
|
|
988
|
+
},
|
|
989
|
+
"props": {
|
|
990
|
+
"currency": {
|
|
991
|
+
"currency": "USD",
|
|
992
|
+
"ratio": 10
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
"locale": "en",
|
|
996
|
+
"key": "intl.currency-overflow",
|
|
997
|
+
"expected": {
|
|
998
|
+
"output": "D",
|
|
999
|
+
"reports": [
|
|
1000
|
+
{
|
|
1001
|
+
"code": "failed-modifier",
|
|
1002
|
+
"origin": "payload",
|
|
1003
|
+
"key": "intl.currency-overflow"
|
|
1004
|
+
}
|
|
1005
|
+
]
|
|
1006
|
+
}
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
"id": "intl/date-digits-are-a-timestamp",
|
|
1010
|
+
"description": "date over 2024 formats the 2024th millisecond after the epoch and not the first day of 2024.",
|
|
1011
|
+
"section": "11.2",
|
|
1012
|
+
"message": "{{v:date}}",
|
|
1013
|
+
"payload": {
|
|
1014
|
+
"v": "2024"
|
|
1015
|
+
},
|
|
1016
|
+
"props": {
|
|
1017
|
+
"date": {
|
|
1018
|
+
"timeZone": "UTC"
|
|
1019
|
+
}
|
|
1020
|
+
},
|
|
1021
|
+
"locale": "en",
|
|
1022
|
+
"expected": {
|
|
1023
|
+
"format": {
|
|
1024
|
+
"api": "DateTimeFormat",
|
|
1025
|
+
"options": {
|
|
1026
|
+
"timeZone": "UTC"
|
|
1027
|
+
},
|
|
1028
|
+
"input": 2024
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
"id": "intl/date-two-digits-are-a-timestamp",
|
|
1034
|
+
"description": "date over 99 formats the 99th millisecond and not a day in 1999.",
|
|
1035
|
+
"section": "11.2",
|
|
1036
|
+
"message": "{{v:date}}",
|
|
1037
|
+
"payload": {
|
|
1038
|
+
"v": "99"
|
|
1039
|
+
},
|
|
1040
|
+
"props": {
|
|
1041
|
+
"date": {
|
|
1042
|
+
"timeZone": "UTC"
|
|
1043
|
+
}
|
|
1044
|
+
},
|
|
1045
|
+
"locale": "en",
|
|
1046
|
+
"expected": {
|
|
1047
|
+
"format": {
|
|
1048
|
+
"api": "DateTimeFormat",
|
|
1049
|
+
"options": {
|
|
1050
|
+
"timeZone": "UTC"
|
|
1051
|
+
},
|
|
1052
|
+
"input": 99
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
"id": "intl/date-padded-number-is-a-timestamp",
|
|
1058
|
+
"description": "A number with whitespace around it is a timestamp, though a host's date parsing reads a year in it.",
|
|
1059
|
+
"section": "11.2",
|
|
1060
|
+
"message": "{{v:date}}",
|
|
1061
|
+
"payload": {
|
|
1062
|
+
"v": " 2024 "
|
|
1063
|
+
},
|
|
1064
|
+
"props": {
|
|
1065
|
+
"date": {
|
|
1066
|
+
"timeZone": "UTC"
|
|
1067
|
+
}
|
|
1068
|
+
},
|
|
1069
|
+
"locale": "en",
|
|
1070
|
+
"expected": {
|
|
1071
|
+
"format": {
|
|
1072
|
+
"api": "DateTimeFormat",
|
|
1073
|
+
"options": {
|
|
1074
|
+
"timeZone": "UTC"
|
|
1075
|
+
},
|
|
1076
|
+
"input": 2024
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
"id": "intl/date-signed-number-is-a-timestamp",
|
|
1082
|
+
"description": "A signed number is a timestamp, though a host's date parsing reads a year in it.",
|
|
1083
|
+
"section": "11.2",
|
|
1084
|
+
"message": "{{v:date}}",
|
|
1085
|
+
"payload": {
|
|
1086
|
+
"v": "+1000"
|
|
1087
|
+
},
|
|
1088
|
+
"props": {
|
|
1089
|
+
"date": {
|
|
1090
|
+
"timeZone": "UTC"
|
|
1091
|
+
}
|
|
1092
|
+
},
|
|
1093
|
+
"locale": "en",
|
|
1094
|
+
"expected": {
|
|
1095
|
+
"format": {
|
|
1096
|
+
"api": "DateTimeFormat",
|
|
1097
|
+
"options": {
|
|
1098
|
+
"timeZone": "UTC"
|
|
1099
|
+
},
|
|
1100
|
+
"input": 1000
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
"id": "intl/layers-worked-example",
|
|
1106
|
+
"description": "The implementation defaults, the props and the wrapper's props compose per property, each overriding only what it names.",
|
|
1107
|
+
"section": "11.2",
|
|
1108
|
+
"message": "{{n:number}}",
|
|
1109
|
+
"payload": {
|
|
1110
|
+
"n": {
|
|
1111
|
+
"value": 1234.5678,
|
|
1112
|
+
"props": {
|
|
1113
|
+
"number": {
|
|
1114
|
+
"maximumFractionDigits": 1
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
},
|
|
1119
|
+
"props": {
|
|
1120
|
+
"number": {
|
|
1121
|
+
"useGrouping": true
|
|
1122
|
+
}
|
|
1123
|
+
},
|
|
1124
|
+
"locale": "en",
|
|
1125
|
+
"defaults": {
|
|
1126
|
+
"number": {
|
|
1127
|
+
"maximumFractionDigits": 4,
|
|
1128
|
+
"useGrouping": false
|
|
1129
|
+
}
|
|
1130
|
+
},
|
|
1131
|
+
"expected": {
|
|
1132
|
+
"format": {
|
|
1133
|
+
"api": "NumberFormat",
|
|
1134
|
+
"options": {
|
|
1135
|
+
"maximumFractionDigits": 1,
|
|
1136
|
+
"useGrouping": true
|
|
1137
|
+
},
|
|
1138
|
+
"input": 1234.5678
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
"id": "intl/defaults-layer",
|
|
1144
|
+
"description": "Implementation-configured defaults are layered over the defaults the section states.",
|
|
1145
|
+
"section": "11.2",
|
|
1146
|
+
"message": "{{n:number}}",
|
|
1147
|
+
"payload": {
|
|
1148
|
+
"n": 1234.5678
|
|
1149
|
+
},
|
|
1150
|
+
"locale": "en",
|
|
1151
|
+
"defaults": {
|
|
1152
|
+
"number": {
|
|
1153
|
+
"maximumFractionDigits": 4
|
|
1154
|
+
}
|
|
1155
|
+
},
|
|
1156
|
+
"expected": {
|
|
1157
|
+
"format": {
|
|
1158
|
+
"api": "NumberFormat",
|
|
1159
|
+
"options": {
|
|
1160
|
+
"maximumFractionDigits": 4
|
|
1161
|
+
},
|
|
1162
|
+
"input": 1234.5678
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
"id": "intl/props-over-defaults",
|
|
1168
|
+
"description": "Props are layered over the implementation-configured defaults.",
|
|
1169
|
+
"section": "11.2",
|
|
1170
|
+
"message": "{{n:number}}",
|
|
1171
|
+
"payload": {
|
|
1172
|
+
"n": 1234.5678
|
|
1173
|
+
},
|
|
1174
|
+
"props": {
|
|
1175
|
+
"number": {
|
|
1176
|
+
"maximumFractionDigits": 3
|
|
1177
|
+
}
|
|
1178
|
+
},
|
|
1179
|
+
"locale": "en",
|
|
1180
|
+
"defaults": {
|
|
1181
|
+
"number": {
|
|
1182
|
+
"maximumFractionDigits": 4
|
|
1183
|
+
}
|
|
1184
|
+
},
|
|
1185
|
+
"expected": {
|
|
1186
|
+
"format": {
|
|
1187
|
+
"api": "NumberFormat",
|
|
1188
|
+
"options": {
|
|
1189
|
+
"maximumFractionDigits": 3
|
|
1190
|
+
},
|
|
1191
|
+
"input": 1234.5678
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
"id": "intl/wrapper-over-props",
|
|
1197
|
+
"description": "A wrapper's props are layered over all the other layers.",
|
|
1198
|
+
"section": "11.2",
|
|
1199
|
+
"message": "{{n:number}}",
|
|
1200
|
+
"payload": {
|
|
1201
|
+
"n": {
|
|
1202
|
+
"value": 1234.5678,
|
|
1203
|
+
"props": {
|
|
1204
|
+
"number": {
|
|
1205
|
+
"maximumFractionDigits": 1
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
},
|
|
1210
|
+
"props": {
|
|
1211
|
+
"number": {
|
|
1212
|
+
"maximumFractionDigits": 3
|
|
1213
|
+
}
|
|
1214
|
+
},
|
|
1215
|
+
"locale": "en",
|
|
1216
|
+
"expected": {
|
|
1217
|
+
"format": {
|
|
1218
|
+
"api": "NumberFormat",
|
|
1219
|
+
"options": {
|
|
1220
|
+
"maximumFractionDigits": 1
|
|
1221
|
+
},
|
|
1222
|
+
"input": 1234.5678
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
},
|
|
1226
|
+
{
|
|
1227
|
+
"id": "intl/layer-keeps-unnamed-property",
|
|
1228
|
+
"description": "A layer overrides only the properties it names, so the section's own maximum of two stands beneath a layer naming only the grouping.",
|
|
1229
|
+
"section": "11.2",
|
|
1230
|
+
"message": "{{n:number}}",
|
|
1231
|
+
"payload": {
|
|
1232
|
+
"n": 1234.5678
|
|
1233
|
+
},
|
|
1234
|
+
"props": {
|
|
1235
|
+
"number": {
|
|
1236
|
+
"useGrouping": false
|
|
1237
|
+
}
|
|
1238
|
+
},
|
|
1239
|
+
"locale": "en",
|
|
1240
|
+
"expected": {
|
|
1241
|
+
"format": {
|
|
1242
|
+
"api": "NumberFormat",
|
|
1243
|
+
"options": {
|
|
1244
|
+
"maximumFractionDigits": 2,
|
|
1245
|
+
"useGrouping": false
|
|
1246
|
+
},
|
|
1247
|
+
"input": 1234.5678
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
"id": "intl/props-read-under-own-name",
|
|
1253
|
+
"description": "Props are read under the modifier's own name: what the caller wrote under another modifier's name does not reach the request.",
|
|
1254
|
+
"section": "11.2",
|
|
1255
|
+
"message": "{{n:number}}",
|
|
1256
|
+
"payload": {
|
|
1257
|
+
"n": 1234.5678
|
|
1258
|
+
},
|
|
1259
|
+
"props": {
|
|
1260
|
+
"number": {
|
|
1261
|
+
"useGrouping": false
|
|
1262
|
+
},
|
|
1263
|
+
"currency": {
|
|
1264
|
+
"maximumFractionDigits": 0
|
|
1265
|
+
}
|
|
1266
|
+
},
|
|
1267
|
+
"locale": "en",
|
|
1268
|
+
"expected": {
|
|
1269
|
+
"format": {
|
|
1270
|
+
"api": "NumberFormat",
|
|
1271
|
+
"options": {
|
|
1272
|
+
"maximumFractionDigits": 2,
|
|
1273
|
+
"useGrouping": false
|
|
1274
|
+
},
|
|
1275
|
+
"input": 1234.5678
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
},
|
|
1279
|
+
{
|
|
1280
|
+
"id": "intl/defaults-read-under-own-name",
|
|
1281
|
+
"description": "The implementation defaults are read under the modifier's own name and nothing written under another's.",
|
|
1282
|
+
"section": "11.2",
|
|
1283
|
+
"message": "{{n:number}}",
|
|
1284
|
+
"payload": {
|
|
1285
|
+
"n": 1234.5678
|
|
1286
|
+
},
|
|
1287
|
+
"locale": "en",
|
|
1288
|
+
"defaults": {
|
|
1289
|
+
"number": {
|
|
1290
|
+
"maximumFractionDigits": 3
|
|
1291
|
+
},
|
|
1292
|
+
"currency": {
|
|
1293
|
+
"maximumFractionDigits": 0
|
|
1294
|
+
}
|
|
1295
|
+
},
|
|
1296
|
+
"expected": {
|
|
1297
|
+
"format": {
|
|
1298
|
+
"api": "NumberFormat",
|
|
1299
|
+
"options": {
|
|
1300
|
+
"maximumFractionDigits": 3
|
|
1301
|
+
},
|
|
1302
|
+
"input": 1234.5678
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
"id": "intl/wrapper-props-read-under-own-name",
|
|
1308
|
+
"description": "A wrapper's props are read under the modifier's own name and nothing written under another's.",
|
|
1309
|
+
"section": "11.2",
|
|
1310
|
+
"message": "{{n:number}}",
|
|
1311
|
+
"payload": {
|
|
1312
|
+
"n": {
|
|
1313
|
+
"value": 1234.5678,
|
|
1314
|
+
"props": {
|
|
1315
|
+
"number": {
|
|
1316
|
+
"maximumFractionDigits": 1
|
|
1317
|
+
},
|
|
1318
|
+
"currency": {
|
|
1319
|
+
"maximumFractionDigits": 0
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
},
|
|
1324
|
+
"locale": "en",
|
|
1325
|
+
"expected": {
|
|
1326
|
+
"format": {
|
|
1327
|
+
"api": "NumberFormat",
|
|
1328
|
+
"options": {
|
|
1329
|
+
"maximumFractionDigits": 1
|
|
1330
|
+
},
|
|
1331
|
+
"input": 1234.5678
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
},
|
|
1335
|
+
{
|
|
1336
|
+
"id": "intl/null-property-is-named",
|
|
1337
|
+
"description": "A property a layer holds the host's null under is one it names: null reaches the formatting request over the layer beneath.",
|
|
1338
|
+
"section": "11.2",
|
|
1339
|
+
"message": "{{n:number}}",
|
|
1340
|
+
"payload": {
|
|
1341
|
+
"n": 1.23456
|
|
1342
|
+
},
|
|
1343
|
+
"props": {
|
|
1344
|
+
"number": {
|
|
1345
|
+
"maximumFractionDigits": null
|
|
1346
|
+
}
|
|
1347
|
+
},
|
|
1348
|
+
"locale": "en",
|
|
1349
|
+
"defaults": {
|
|
1350
|
+
"number": {
|
|
1351
|
+
"maximumFractionDigits": 4
|
|
1352
|
+
}
|
|
1353
|
+
},
|
|
1354
|
+
"expected": {
|
|
1355
|
+
"format": {
|
|
1356
|
+
"api": "NumberFormat",
|
|
1357
|
+
"options": {
|
|
1358
|
+
"maximumFractionDigits": null
|
|
1359
|
+
},
|
|
1360
|
+
"input": 1.23456
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
},
|
|
1364
|
+
{
|
|
1365
|
+
"id": "intl/undefined-property-in-props-not-named",
|
|
1366
|
+
"description": "A property the props hold the host's undefined under is not named, so the implementation default beneath it stands.",
|
|
1367
|
+
"section": "11.2",
|
|
1368
|
+
"message": "{{n:number}}",
|
|
1369
|
+
"payload": {
|
|
1370
|
+
"n": 1234.5678
|
|
1371
|
+
},
|
|
1372
|
+
"props": {
|
|
1373
|
+
"number": {
|
|
1374
|
+
"maximumFractionDigits": {
|
|
1375
|
+
"$curly": "undefined"
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
},
|
|
1379
|
+
"locale": "en",
|
|
1380
|
+
"defaults": {
|
|
1381
|
+
"number": {
|
|
1382
|
+
"maximumFractionDigits": 4
|
|
1383
|
+
}
|
|
1384
|
+
},
|
|
1385
|
+
"expected": {
|
|
1386
|
+
"format": {
|
|
1387
|
+
"api": "NumberFormat",
|
|
1388
|
+
"options": {
|
|
1389
|
+
"maximumFractionDigits": 4
|
|
1390
|
+
},
|
|
1391
|
+
"input": 1234.5678
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
"id": "intl/undefined-wrapper-entry-not-named",
|
|
1397
|
+
"description": "A wrapper whose props hold the host's undefined under the modifier's name names nothing, so the props beneath stand.",
|
|
1398
|
+
"section": "11.2",
|
|
1399
|
+
"message": "{{n:number}}",
|
|
1400
|
+
"payload": {
|
|
1401
|
+
"n": {
|
|
1402
|
+
"value": 1234.5678,
|
|
1403
|
+
"props": {
|
|
1404
|
+
"number": {
|
|
1405
|
+
"$curly": "undefined"
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
},
|
|
1410
|
+
"props": {
|
|
1411
|
+
"number": {
|
|
1412
|
+
"useGrouping": false
|
|
1413
|
+
}
|
|
1414
|
+
},
|
|
1415
|
+
"locale": "en",
|
|
1416
|
+
"expected": {
|
|
1417
|
+
"format": {
|
|
1418
|
+
"api": "NumberFormat",
|
|
1419
|
+
"options": {
|
|
1420
|
+
"maximumFractionDigits": 2,
|
|
1421
|
+
"useGrouping": false
|
|
1422
|
+
},
|
|
1423
|
+
"input": 1234.5678
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
},
|
|
1427
|
+
{
|
|
1428
|
+
"id": "intl/undefined-in-defaults-not-named",
|
|
1429
|
+
"description": "An implementation default holding the host's undefined names nothing, so the section's own maximum of two stands.",
|
|
1430
|
+
"section": "11.2",
|
|
1431
|
+
"message": "{{n:number}}",
|
|
1432
|
+
"payload": {
|
|
1433
|
+
"n": 1234.5678
|
|
1434
|
+
},
|
|
1435
|
+
"locale": "en",
|
|
1436
|
+
"defaults": {
|
|
1437
|
+
"number": {
|
|
1438
|
+
"maximumFractionDigits": {
|
|
1439
|
+
"$curly": "undefined"
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
},
|
|
1443
|
+
"expected": {
|
|
1444
|
+
"format": {
|
|
1445
|
+
"api": "NumberFormat",
|
|
1446
|
+
"options": {
|
|
1447
|
+
"maximumFractionDigits": 2
|
|
1448
|
+
},
|
|
1449
|
+
"input": 1234.5678
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
},
|
|
1453
|
+
{
|
|
1454
|
+
"id": "intl/date-layers-compose",
|
|
1455
|
+
"description": "date composes its properties per property over the implementation defaults.",
|
|
1456
|
+
"section": "11.2",
|
|
1457
|
+
"message": "{{d:date}}",
|
|
1458
|
+
"payload": {
|
|
1459
|
+
"d": 1709632800000
|
|
1460
|
+
},
|
|
1461
|
+
"props": {
|
|
1462
|
+
"date": {
|
|
1463
|
+
"timeZone": "UTC",
|
|
1464
|
+
"dateStyle": "medium"
|
|
1465
|
+
}
|
|
1466
|
+
},
|
|
1467
|
+
"locale": "en",
|
|
1468
|
+
"defaults": {
|
|
1469
|
+
"date": {
|
|
1470
|
+
"dateStyle": "full",
|
|
1471
|
+
"timeStyle": "short"
|
|
1472
|
+
}
|
|
1473
|
+
},
|
|
1474
|
+
"expected": {
|
|
1475
|
+
"format": {
|
|
1476
|
+
"api": "DateTimeFormat",
|
|
1477
|
+
"options": {
|
|
1478
|
+
"timeZone": "UTC",
|
|
1479
|
+
"dateStyle": "medium",
|
|
1480
|
+
"timeStyle": "short"
|
|
1481
|
+
},
|
|
1482
|
+
"input": 1709632800000
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
"id": "intl/ago-layers-compose",
|
|
1488
|
+
"description": "ago composes its properties per property over the implementation defaults, the section's numeric beneath them.",
|
|
1489
|
+
"section": "11.2",
|
|
1490
|
+
"message": "{{t:ago}}",
|
|
1491
|
+
"payload": {
|
|
1492
|
+
"t": -172800000
|
|
1493
|
+
},
|
|
1494
|
+
"props": {
|
|
1495
|
+
"ago": {
|
|
1496
|
+
"style": "narrow"
|
|
1497
|
+
}
|
|
1498
|
+
},
|
|
1499
|
+
"locale": "en",
|
|
1500
|
+
"defaults": {
|
|
1501
|
+
"ago": {
|
|
1502
|
+
"style": "long"
|
|
1503
|
+
}
|
|
1504
|
+
},
|
|
1505
|
+
"expected": {
|
|
1506
|
+
"format": {
|
|
1507
|
+
"api": "RelativeTimeFormat",
|
|
1508
|
+
"options": {
|
|
1509
|
+
"numeric": "auto",
|
|
1510
|
+
"style": "narrow"
|
|
1511
|
+
},
|
|
1512
|
+
"input": [
|
|
1513
|
+
-2,
|
|
1514
|
+
"day"
|
|
1515
|
+
]
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
},
|
|
1519
|
+
{
|
|
1520
|
+
"id": "intl/currency-layers-compose",
|
|
1521
|
+
"description": "currency composes its properties per property over the implementation defaults.",
|
|
1522
|
+
"section": "11.2",
|
|
1523
|
+
"message": "{{v:currency}}",
|
|
1524
|
+
"payload": {
|
|
1525
|
+
"v": 10
|
|
1526
|
+
},
|
|
1527
|
+
"props": {
|
|
1528
|
+
"currency": {
|
|
1529
|
+
"currencyDisplay": "code"
|
|
1530
|
+
}
|
|
1531
|
+
},
|
|
1532
|
+
"locale": "en",
|
|
1533
|
+
"defaults": {
|
|
1534
|
+
"currency": {
|
|
1535
|
+
"currency": "USD",
|
|
1536
|
+
"currencyDisplay": "name"
|
|
1537
|
+
}
|
|
1538
|
+
},
|
|
1539
|
+
"expected": {
|
|
1540
|
+
"format": {
|
|
1541
|
+
"api": "NumberFormat",
|
|
1542
|
+
"options": {
|
|
1543
|
+
"style": "currency",
|
|
1544
|
+
"currency": "USD",
|
|
1545
|
+
"currencyDisplay": "code"
|
|
1546
|
+
},
|
|
1547
|
+
"input": 10
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
"id": "intl/minimum-widens-default-maximum",
|
|
1553
|
+
"description": "Where a layer names a minimumFractionDigits above two, the default maximum widens to reach it.",
|
|
1554
|
+
"section": "11.2",
|
|
1555
|
+
"message": "{{n:number}}",
|
|
1556
|
+
"payload": {
|
|
1557
|
+
"n": 1.5
|
|
1558
|
+
},
|
|
1559
|
+
"props": {
|
|
1560
|
+
"number": {
|
|
1561
|
+
"minimumFractionDigits": 4
|
|
1562
|
+
}
|
|
1563
|
+
},
|
|
1564
|
+
"locale": "en",
|
|
1565
|
+
"expected": {
|
|
1566
|
+
"format": {
|
|
1567
|
+
"api": "NumberFormat",
|
|
1568
|
+
"options": {
|
|
1569
|
+
"minimumFractionDigits": 4,
|
|
1570
|
+
"maximumFractionDigits": 4
|
|
1571
|
+
},
|
|
1572
|
+
"input": 1.5
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
},
|
|
1576
|
+
{
|
|
1577
|
+
"id": "intl/widening-runs-after-composition",
|
|
1578
|
+
"description": "The widening runs after the layers have composed, so it reaches the minimum the topmost layer named.",
|
|
1579
|
+
"section": "11.2",
|
|
1580
|
+
"message": "{{n:number}}",
|
|
1581
|
+
"payload": {
|
|
1582
|
+
"n": 1.5
|
|
1583
|
+
},
|
|
1584
|
+
"props": {
|
|
1585
|
+
"number": {
|
|
1586
|
+
"minimumFractionDigits": 6
|
|
1587
|
+
}
|
|
1588
|
+
},
|
|
1589
|
+
"locale": "en",
|
|
1590
|
+
"defaults": {
|
|
1591
|
+
"number": {
|
|
1592
|
+
"minimumFractionDigits": 4
|
|
1593
|
+
}
|
|
1594
|
+
},
|
|
1595
|
+
"expected": {
|
|
1596
|
+
"format": {
|
|
1597
|
+
"api": "NumberFormat",
|
|
1598
|
+
"options": {
|
|
1599
|
+
"minimumFractionDigits": 6,
|
|
1600
|
+
"maximumFractionDigits": 6
|
|
1601
|
+
},
|
|
1602
|
+
"input": 1.5
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
},
|
|
1606
|
+
{
|
|
1607
|
+
"id": "intl/minimum-under-default-keeps-maximum",
|
|
1608
|
+
"description": "A minimum under two leaves the default maximum of two in place.",
|
|
1609
|
+
"section": "11.2",
|
|
1610
|
+
"message": "{{n:number}}",
|
|
1611
|
+
"payload": {
|
|
1612
|
+
"n": 1.23456
|
|
1613
|
+
},
|
|
1614
|
+
"props": {
|
|
1615
|
+
"number": {
|
|
1616
|
+
"minimumFractionDigits": 1
|
|
1617
|
+
}
|
|
1618
|
+
},
|
|
1619
|
+
"locale": "en",
|
|
1620
|
+
"expected": {
|
|
1621
|
+
"format": {
|
|
1622
|
+
"api": "NumberFormat",
|
|
1623
|
+
"options": {
|
|
1624
|
+
"minimumFractionDigits": 1,
|
|
1625
|
+
"maximumFractionDigits": 2
|
|
1626
|
+
},
|
|
1627
|
+
"input": 1.23456
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1631
|
+
{
|
|
1632
|
+
"id": "intl/widens-to-minimum-exactly",
|
|
1633
|
+
"description": "The default widens to the named minimum exactly and not past it.",
|
|
1634
|
+
"section": "11.2",
|
|
1635
|
+
"message": "{{n:number}}",
|
|
1636
|
+
"payload": {
|
|
1637
|
+
"n": 1.23456789
|
|
1638
|
+
},
|
|
1639
|
+
"props": {
|
|
1640
|
+
"number": {
|
|
1641
|
+
"minimumFractionDigits": 3
|
|
1642
|
+
}
|
|
1643
|
+
},
|
|
1644
|
+
"locale": "en",
|
|
1645
|
+
"expected": {
|
|
1646
|
+
"format": {
|
|
1647
|
+
"api": "NumberFormat",
|
|
1648
|
+
"options": {
|
|
1649
|
+
"minimumFractionDigits": 3,
|
|
1650
|
+
"maximumFractionDigits": 3
|
|
1651
|
+
},
|
|
1652
|
+
"input": 1.23456789
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
},
|
|
1656
|
+
{
|
|
1657
|
+
"id": "intl/named-maximum-decides",
|
|
1658
|
+
"description": "A layer that names the maximum itself decides it, beside a minimum another layer names.",
|
|
1659
|
+
"section": "11.2",
|
|
1660
|
+
"message": "{{n:number}}",
|
|
1661
|
+
"payload": {
|
|
1662
|
+
"n": 1.5
|
|
1663
|
+
},
|
|
1664
|
+
"props": {
|
|
1665
|
+
"number": {
|
|
1666
|
+
"maximumFractionDigits": 5
|
|
1667
|
+
}
|
|
1668
|
+
},
|
|
1669
|
+
"locale": "en",
|
|
1670
|
+
"defaults": {
|
|
1671
|
+
"number": {
|
|
1672
|
+
"minimumFractionDigits": 3
|
|
1673
|
+
}
|
|
1674
|
+
},
|
|
1675
|
+
"expected": {
|
|
1676
|
+
"format": {
|
|
1677
|
+
"api": "NumberFormat",
|
|
1678
|
+
"options": {
|
|
1679
|
+
"minimumFractionDigits": 3,
|
|
1680
|
+
"maximumFractionDigits": 5
|
|
1681
|
+
},
|
|
1682
|
+
"input": 1.5
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
"id": "intl/named-maximum-under-minimum-fails",
|
|
1688
|
+
"description": "Only the default widens: a named maximum under a named minimum is the request the host is asked for, and where it rejects the request the placeholder takes the chain with a failed-modifier report.",
|
|
1689
|
+
"section": "11.2",
|
|
1690
|
+
"message": "{{n:number; default:D}}",
|
|
1691
|
+
"payload": {
|
|
1692
|
+
"n": 1.5
|
|
1693
|
+
},
|
|
1694
|
+
"props": {
|
|
1695
|
+
"number": {
|
|
1696
|
+
"maximumFractionDigits": 1
|
|
1697
|
+
}
|
|
1698
|
+
},
|
|
1699
|
+
"locale": "en",
|
|
1700
|
+
"key": "intl.maximum-under-minimum",
|
|
1701
|
+
"defaults": {
|
|
1702
|
+
"number": {
|
|
1703
|
+
"minimumFractionDigits": 4
|
|
1704
|
+
}
|
|
1705
|
+
},
|
|
1706
|
+
"expected": {
|
|
1707
|
+
"output": "D",
|
|
1708
|
+
"reports": [
|
|
1709
|
+
{
|
|
1710
|
+
"code": "failed-modifier",
|
|
1711
|
+
"origin": "payload",
|
|
1712
|
+
"key": "intl.maximum-under-minimum"
|
|
1713
|
+
}
|
|
1714
|
+
]
|
|
1715
|
+
}
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
"id": "intl/currency-style-over-defaults",
|
|
1719
|
+
"description": "currency formats in the currency style over an implementation default naming another style.",
|
|
1720
|
+
"section": "11.2",
|
|
1721
|
+
"message": "{{v:currency}}",
|
|
1722
|
+
"payload": {
|
|
1723
|
+
"v": 0.5
|
|
1724
|
+
},
|
|
1725
|
+
"locale": "en",
|
|
1726
|
+
"defaults": {
|
|
1727
|
+
"currency": {
|
|
1728
|
+
"currency": "USD",
|
|
1729
|
+
"style": "percent"
|
|
1730
|
+
}
|
|
1731
|
+
},
|
|
1732
|
+
"expected": {
|
|
1733
|
+
"format": {
|
|
1734
|
+
"api": "NumberFormat",
|
|
1735
|
+
"options": {
|
|
1736
|
+
"style": "currency",
|
|
1737
|
+
"currency": "USD"
|
|
1738
|
+
},
|
|
1739
|
+
"input": 0.5
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
},
|
|
1743
|
+
{
|
|
1744
|
+
"id": "intl/currency-style-over-props",
|
|
1745
|
+
"description": "currency formats in the currency style over props naming another style.",
|
|
1746
|
+
"section": "11.2",
|
|
1747
|
+
"message": "{{v:currency}}",
|
|
1748
|
+
"payload": {
|
|
1749
|
+
"v": 0.5
|
|
1750
|
+
},
|
|
1751
|
+
"props": {
|
|
1752
|
+
"currency": {
|
|
1753
|
+
"currency": "USD",
|
|
1754
|
+
"style": "percent"
|
|
1755
|
+
}
|
|
1756
|
+
},
|
|
1757
|
+
"locale": "en",
|
|
1758
|
+
"expected": {
|
|
1759
|
+
"format": {
|
|
1760
|
+
"api": "NumberFormat",
|
|
1761
|
+
"options": {
|
|
1762
|
+
"style": "currency",
|
|
1763
|
+
"currency": "USD"
|
|
1764
|
+
},
|
|
1765
|
+
"input": 0.5
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
},
|
|
1769
|
+
{
|
|
1770
|
+
"id": "intl/currency-style-over-wrapper",
|
|
1771
|
+
"description": "currency formats in the currency style over a wrapper's props naming another style.",
|
|
1772
|
+
"section": "11.2",
|
|
1773
|
+
"message": "{{v:currency}}",
|
|
1774
|
+
"payload": {
|
|
1775
|
+
"v": {
|
|
1776
|
+
"value": 0.5,
|
|
1777
|
+
"props": {
|
|
1778
|
+
"currency": {
|
|
1779
|
+
"style": "decimal"
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
},
|
|
1784
|
+
"props": {
|
|
1785
|
+
"currency": {
|
|
1786
|
+
"currency": "USD"
|
|
1787
|
+
}
|
|
1788
|
+
},
|
|
1789
|
+
"locale": "en",
|
|
1790
|
+
"expected": {
|
|
1791
|
+
"format": {
|
|
1792
|
+
"api": "NumberFormat",
|
|
1793
|
+
"options": {
|
|
1794
|
+
"style": "currency",
|
|
1795
|
+
"currency": "USD"
|
|
1796
|
+
},
|
|
1797
|
+
"input": 0.5
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
},
|
|
1801
|
+
{
|
|
1802
|
+
"id": "intl/currency-code-from-defaults",
|
|
1803
|
+
"description": "The currency to format in comes from the implementation defaults where they name it.",
|
|
1804
|
+
"section": "11.2",
|
|
1805
|
+
"message": "{{v:currency}}",
|
|
1806
|
+
"payload": {
|
|
1807
|
+
"v": 200
|
|
1808
|
+
},
|
|
1809
|
+
"locale": "de",
|
|
1810
|
+
"defaults": {
|
|
1811
|
+
"currency": {
|
|
1812
|
+
"currency": "EUR"
|
|
1813
|
+
}
|
|
1814
|
+
},
|
|
1815
|
+
"expected": {
|
|
1816
|
+
"format": {
|
|
1817
|
+
"api": "NumberFormat",
|
|
1818
|
+
"options": {
|
|
1819
|
+
"style": "currency",
|
|
1820
|
+
"currency": "EUR"
|
|
1821
|
+
},
|
|
1822
|
+
"input": 200
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
},
|
|
1826
|
+
{
|
|
1827
|
+
"id": "intl/currency-code-from-wrapper",
|
|
1828
|
+
"description": "The currency to format in comes from the wrapper's props where they name it.",
|
|
1829
|
+
"section": "11.2",
|
|
1830
|
+
"message": "{{v:currency}}",
|
|
1831
|
+
"payload": {
|
|
1832
|
+
"v": {
|
|
1833
|
+
"value": 10,
|
|
1834
|
+
"props": {
|
|
1835
|
+
"currency": {
|
|
1836
|
+
"currency": "CZK"
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
},
|
|
1841
|
+
"locale": "cs",
|
|
1842
|
+
"expected": {
|
|
1843
|
+
"format": {
|
|
1844
|
+
"api": "NumberFormat",
|
|
1845
|
+
"options": {
|
|
1846
|
+
"style": "currency",
|
|
1847
|
+
"currency": "CZK"
|
|
1848
|
+
},
|
|
1849
|
+
"input": 10
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
},
|
|
1853
|
+
{
|
|
1854
|
+
"id": "intl/currency-code-from-props-over-defaults",
|
|
1855
|
+
"description": "The currency the props name overrides the one the implementation defaults name.",
|
|
1856
|
+
"section": "11.2",
|
|
1857
|
+
"message": "{{v:currency}}",
|
|
1858
|
+
"payload": {
|
|
1859
|
+
"v": 10
|
|
1860
|
+
},
|
|
1861
|
+
"props": {
|
|
1862
|
+
"currency": {
|
|
1863
|
+
"currency": "CZK"
|
|
1864
|
+
}
|
|
1865
|
+
},
|
|
1866
|
+
"locale": "en",
|
|
1867
|
+
"defaults": {
|
|
1868
|
+
"currency": {
|
|
1869
|
+
"currency": "USD"
|
|
1870
|
+
}
|
|
1871
|
+
},
|
|
1872
|
+
"expected": {
|
|
1873
|
+
"format": {
|
|
1874
|
+
"api": "NumberFormat",
|
|
1875
|
+
"options": {
|
|
1876
|
+
"style": "currency",
|
|
1877
|
+
"currency": "CZK"
|
|
1878
|
+
},
|
|
1879
|
+
"input": 10
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
},
|
|
1883
|
+
{
|
|
1884
|
+
"id": "intl/currency-ratio-from-defaults",
|
|
1885
|
+
"description": "The ratio comes from the implementation defaults where they name it.",
|
|
1886
|
+
"section": "11.2",
|
|
1887
|
+
"message": "{{v:currency}}",
|
|
1888
|
+
"payload": {
|
|
1889
|
+
"v": 2
|
|
1890
|
+
},
|
|
1891
|
+
"locale": "en",
|
|
1892
|
+
"defaults": {
|
|
1893
|
+
"currency": {
|
|
1894
|
+
"currency": "USD",
|
|
1895
|
+
"ratio": 100
|
|
1896
|
+
}
|
|
1897
|
+
},
|
|
1898
|
+
"expected": {
|
|
1899
|
+
"format": {
|
|
1900
|
+
"api": "NumberFormat",
|
|
1901
|
+
"options": {
|
|
1902
|
+
"style": "currency",
|
|
1903
|
+
"currency": "USD"
|
|
1904
|
+
},
|
|
1905
|
+
"input": 200
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
},
|
|
1909
|
+
{
|
|
1910
|
+
"id": "intl/currency-ratio-zero-is-named",
|
|
1911
|
+
"description": "A ratio of zero is a value a layer names, not an absence: the product is zero.",
|
|
1912
|
+
"section": "11.2",
|
|
1913
|
+
"message": "{{v:currency}}",
|
|
1914
|
+
"payload": {
|
|
1915
|
+
"v": 1234.56
|
|
1916
|
+
},
|
|
1917
|
+
"locale": "en",
|
|
1918
|
+
"defaults": {
|
|
1919
|
+
"currency": {
|
|
1920
|
+
"currency": "USD",
|
|
1921
|
+
"ratio": 0
|
|
1922
|
+
}
|
|
1923
|
+
},
|
|
1924
|
+
"expected": {
|
|
1925
|
+
"format": {
|
|
1926
|
+
"api": "NumberFormat",
|
|
1927
|
+
"options": {
|
|
1928
|
+
"style": "currency",
|
|
1929
|
+
"currency": "USD"
|
|
1930
|
+
},
|
|
1931
|
+
"input": 0
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
},
|
|
1935
|
+
{
|
|
1936
|
+
"id": "intl/option-is-not-a-ratio",
|
|
1937
|
+
"description": "A placeholder segment spelled like a ratio is an option that reaches no layer, so the ratio stays one.",
|
|
1938
|
+
"section": "11.2",
|
|
1939
|
+
"message": "{{v:currency; ratio:100}}",
|
|
1940
|
+
"payload": {
|
|
1941
|
+
"v": 2
|
|
1942
|
+
},
|
|
1943
|
+
"props": {
|
|
1944
|
+
"currency": {
|
|
1945
|
+
"currency": "USD"
|
|
1946
|
+
}
|
|
1947
|
+
},
|
|
1948
|
+
"locale": "en",
|
|
1949
|
+
"expected": {
|
|
1950
|
+
"format": {
|
|
1951
|
+
"api": "NumberFormat",
|
|
1952
|
+
"options": {
|
|
1953
|
+
"style": "currency",
|
|
1954
|
+
"currency": "USD"
|
|
1955
|
+
},
|
|
1956
|
+
"input": 2
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
},
|
|
1960
|
+
{
|
|
1961
|
+
"id": "intl/option-is-not-a-maximum",
|
|
1962
|
+
"description": "A placeholder segment spelled like a fraction-digit maximum is an option that reaches no layer, so the maximum stays two.",
|
|
1963
|
+
"section": "11.2",
|
|
1964
|
+
"message": "{{v:number; maximumFractionDigits:4}}",
|
|
1965
|
+
"payload": {
|
|
1966
|
+
"v": 1.23456
|
|
1967
|
+
},
|
|
1968
|
+
"locale": "en",
|
|
1969
|
+
"expected": {
|
|
1970
|
+
"format": {
|
|
1971
|
+
"api": "NumberFormat",
|
|
1972
|
+
"options": {
|
|
1973
|
+
"maximumFractionDigits": 2
|
|
1974
|
+
},
|
|
1975
|
+
"input": 1.23456
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
},
|
|
1979
|
+
{
|
|
1980
|
+
"id": "intl/option-is-not-a-format",
|
|
1981
|
+
"description": "A placeholder segment spelled like an ago format is an option that reaches no layer, so the unit stays the one the climb selects.",
|
|
1982
|
+
"section": "11.2",
|
|
1983
|
+
"message": "{{v:ago; format:day}}",
|
|
1984
|
+
"payload": {
|
|
1985
|
+
"v": -604800000
|
|
1986
|
+
},
|
|
1987
|
+
"locale": "en",
|
|
1988
|
+
"expected": {
|
|
1989
|
+
"format": {
|
|
1990
|
+
"api": "RelativeTimeFormat",
|
|
1991
|
+
"options": {
|
|
1992
|
+
"numeric": "auto"
|
|
1993
|
+
},
|
|
1994
|
+
"input": [
|
|
1995
|
+
-1,
|
|
1996
|
+
"week"
|
|
1997
|
+
]
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
},
|
|
2001
|
+
{
|
|
2002
|
+
"id": "intl/option-is-not-a-currency",
|
|
2003
|
+
"description": "A message cannot name the currency: a segment spelled like one reaches no layer, so the code a layer names is the one formatted in.",
|
|
2004
|
+
"section": "11.2",
|
|
2005
|
+
"message": "{{v:currency; currency:USD}}",
|
|
2006
|
+
"payload": {
|
|
2007
|
+
"v": 2
|
|
2008
|
+
},
|
|
2009
|
+
"locale": "en",
|
|
2010
|
+
"defaults": {
|
|
2011
|
+
"currency": {
|
|
2012
|
+
"currency": "EUR"
|
|
2013
|
+
}
|
|
2014
|
+
},
|
|
2015
|
+
"expected": {
|
|
2016
|
+
"format": {
|
|
2017
|
+
"api": "NumberFormat",
|
|
2018
|
+
"options": {
|
|
2019
|
+
"style": "currency",
|
|
2020
|
+
"currency": "EUR"
|
|
2021
|
+
},
|
|
2022
|
+
"input": 2
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
},
|
|
2026
|
+
{
|
|
2027
|
+
"id": "intl/ago-ladder-second",
|
|
2028
|
+
"description": "The climb starts at the count of seconds.",
|
|
2029
|
+
"section": "11.2",
|
|
2030
|
+
"message": "{{t:ago}}",
|
|
2031
|
+
"payload": {
|
|
2032
|
+
"t": -2000
|
|
2033
|
+
},
|
|
2034
|
+
"locale": "en",
|
|
2035
|
+
"expected": {
|
|
2036
|
+
"format": {
|
|
2037
|
+
"api": "RelativeTimeFormat",
|
|
2038
|
+
"options": {
|
|
2039
|
+
"numeric": "auto"
|
|
2040
|
+
},
|
|
2041
|
+
"input": [
|
|
2042
|
+
-2,
|
|
2043
|
+
"second"
|
|
2044
|
+
]
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
},
|
|
2048
|
+
{
|
|
2049
|
+
"id": "intl/ago-ladder-minute",
|
|
2050
|
+
"description": "60 seconds make a minute.",
|
|
2051
|
+
"section": "11.2",
|
|
2052
|
+
"message": "{{t:ago}}",
|
|
2053
|
+
"payload": {
|
|
2054
|
+
"t": -120000
|
|
2055
|
+
},
|
|
2056
|
+
"locale": "en",
|
|
2057
|
+
"expected": {
|
|
2058
|
+
"format": {
|
|
2059
|
+
"api": "RelativeTimeFormat",
|
|
2060
|
+
"options": {
|
|
2061
|
+
"numeric": "auto"
|
|
2062
|
+
},
|
|
2063
|
+
"input": [
|
|
2064
|
+
-2,
|
|
2065
|
+
"minute"
|
|
2066
|
+
]
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
},
|
|
2070
|
+
{
|
|
2071
|
+
"id": "intl/ago-ladder-hour",
|
|
2072
|
+
"description": "60 minutes make an hour.",
|
|
2073
|
+
"section": "11.2",
|
|
2074
|
+
"message": "{{t:ago}}",
|
|
2075
|
+
"payload": {
|
|
2076
|
+
"t": -7200000
|
|
2077
|
+
},
|
|
2078
|
+
"locale": "en",
|
|
2079
|
+
"expected": {
|
|
2080
|
+
"format": {
|
|
2081
|
+
"api": "RelativeTimeFormat",
|
|
2082
|
+
"options": {
|
|
2083
|
+
"numeric": "auto"
|
|
2084
|
+
},
|
|
2085
|
+
"input": [
|
|
2086
|
+
-2,
|
|
2087
|
+
"hour"
|
|
2088
|
+
]
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2091
|
+
},
|
|
2092
|
+
{
|
|
2093
|
+
"id": "intl/ago-ladder-day",
|
|
2094
|
+
"description": "24 hours make a day.",
|
|
2095
|
+
"section": "11.2",
|
|
2096
|
+
"message": "{{t:ago}}",
|
|
2097
|
+
"payload": {
|
|
2098
|
+
"t": -172800000
|
|
2099
|
+
},
|
|
2100
|
+
"locale": "en",
|
|
2101
|
+
"expected": {
|
|
2102
|
+
"format": {
|
|
2103
|
+
"api": "RelativeTimeFormat",
|
|
2104
|
+
"options": {
|
|
2105
|
+
"numeric": "auto"
|
|
2106
|
+
},
|
|
2107
|
+
"input": [
|
|
2108
|
+
-2,
|
|
2109
|
+
"day"
|
|
2110
|
+
]
|
|
2111
|
+
}
|
|
2112
|
+
}
|
|
2113
|
+
},
|
|
2114
|
+
{
|
|
2115
|
+
"id": "intl/ago-ladder-week",
|
|
2116
|
+
"description": "7 days make a week.",
|
|
2117
|
+
"section": "11.2",
|
|
2118
|
+
"message": "{{t:ago}}",
|
|
2119
|
+
"payload": {
|
|
2120
|
+
"t": -1209600000
|
|
2121
|
+
},
|
|
2122
|
+
"locale": "en",
|
|
2123
|
+
"expected": {
|
|
2124
|
+
"format": {
|
|
2125
|
+
"api": "RelativeTimeFormat",
|
|
2126
|
+
"options": {
|
|
2127
|
+
"numeric": "auto"
|
|
2128
|
+
},
|
|
2129
|
+
"input": [
|
|
2130
|
+
-2,
|
|
2131
|
+
"week"
|
|
2132
|
+
]
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
},
|
|
2136
|
+
{
|
|
2137
|
+
"id": "intl/ago-ladder-month",
|
|
2138
|
+
"description": "Thirteen thirds of a week make a month.",
|
|
2139
|
+
"section": "11.2",
|
|
2140
|
+
"message": "{{t:ago}}",
|
|
2141
|
+
"payload": {
|
|
2142
|
+
"t": -5241600000
|
|
2143
|
+
},
|
|
2144
|
+
"locale": "en",
|
|
2145
|
+
"expected": {
|
|
2146
|
+
"format": {
|
|
2147
|
+
"api": "RelativeTimeFormat",
|
|
2148
|
+
"options": {
|
|
2149
|
+
"numeric": "auto"
|
|
2150
|
+
},
|
|
2151
|
+
"input": [
|
|
2152
|
+
-2,
|
|
2153
|
+
"month"
|
|
2154
|
+
]
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
},
|
|
2158
|
+
{
|
|
2159
|
+
"id": "intl/ago-ladder-year",
|
|
2160
|
+
"description": "12 months make a year.",
|
|
2161
|
+
"section": "11.2",
|
|
2162
|
+
"message": "{{t:ago}}",
|
|
2163
|
+
"payload": {
|
|
2164
|
+
"t": -62899200000
|
|
2165
|
+
},
|
|
2166
|
+
"locale": "en",
|
|
2167
|
+
"expected": {
|
|
2168
|
+
"format": {
|
|
2169
|
+
"api": "RelativeTimeFormat",
|
|
2170
|
+
"options": {
|
|
2171
|
+
"numeric": "auto"
|
|
2172
|
+
},
|
|
2173
|
+
"input": [
|
|
2174
|
+
-2,
|
|
2175
|
+
"year"
|
|
2176
|
+
]
|
|
2177
|
+
}
|
|
2178
|
+
}
|
|
2179
|
+
},
|
|
2180
|
+
{
|
|
2181
|
+
"id": "intl/ago-rounds-at-every-step-week",
|
|
2182
|
+
"description": "Three and a half days is four days before it is a week, and so formats as one week.",
|
|
2183
|
+
"section": "11.2",
|
|
2184
|
+
"message": "{{t:ago}}",
|
|
2185
|
+
"payload": {
|
|
2186
|
+
"t": 302400000
|
|
2187
|
+
},
|
|
2188
|
+
"locale": "en",
|
|
2189
|
+
"expected": {
|
|
2190
|
+
"format": {
|
|
2191
|
+
"api": "RelativeTimeFormat",
|
|
2192
|
+
"options": {
|
|
2193
|
+
"numeric": "auto"
|
|
2194
|
+
},
|
|
2195
|
+
"input": [
|
|
2196
|
+
1,
|
|
2197
|
+
"week"
|
|
2198
|
+
]
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
},
|
|
2202
|
+
{
|
|
2203
|
+
"id": "intl/ago-rounds-at-every-step-month",
|
|
2204
|
+
"description": "Twenty-six days is four weeks and then one month.",
|
|
2205
|
+
"section": "11.2",
|
|
2206
|
+
"message": "{{t:ago}}",
|
|
2207
|
+
"payload": {
|
|
2208
|
+
"t": 2246400000
|
|
2209
|
+
},
|
|
2210
|
+
"locale": "en",
|
|
2211
|
+
"expected": {
|
|
2212
|
+
"format": {
|
|
2213
|
+
"api": "RelativeTimeFormat",
|
|
2214
|
+
"options": {
|
|
2215
|
+
"numeric": "auto"
|
|
2216
|
+
},
|
|
2217
|
+
"input": [
|
|
2218
|
+
1,
|
|
2219
|
+
"month"
|
|
2220
|
+
]
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
},
|
|
2224
|
+
{
|
|
2225
|
+
"id": "intl/ago-half-step-minute",
|
|
2226
|
+
"description": "A half rounds away from zero, so 30 seconds make a minute.",
|
|
2227
|
+
"section": "11.2",
|
|
2228
|
+
"message": "{{t:ago}}",
|
|
2229
|
+
"payload": {
|
|
2230
|
+
"t": 30000
|
|
2231
|
+
},
|
|
2232
|
+
"locale": "en",
|
|
2233
|
+
"expected": {
|
|
2234
|
+
"format": {
|
|
2235
|
+
"api": "RelativeTimeFormat",
|
|
2236
|
+
"options": {
|
|
2237
|
+
"numeric": "auto"
|
|
2238
|
+
},
|
|
2239
|
+
"input": [
|
|
2240
|
+
1,
|
|
2241
|
+
"minute"
|
|
2242
|
+
]
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
},
|
|
2246
|
+
{
|
|
2247
|
+
"id": "intl/ago-half-step-hour",
|
|
2248
|
+
"description": "30 minutes make an hour.",
|
|
2249
|
+
"section": "11.2",
|
|
2250
|
+
"message": "{{t:ago}}",
|
|
2251
|
+
"payload": {
|
|
2252
|
+
"t": 1800000
|
|
2253
|
+
},
|
|
2254
|
+
"locale": "en",
|
|
2255
|
+
"expected": {
|
|
2256
|
+
"format": {
|
|
2257
|
+
"api": "RelativeTimeFormat",
|
|
2258
|
+
"options": {
|
|
2259
|
+
"numeric": "auto"
|
|
2260
|
+
},
|
|
2261
|
+
"input": [
|
|
2262
|
+
1,
|
|
2263
|
+
"hour"
|
|
2264
|
+
]
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
},
|
|
2268
|
+
{
|
|
2269
|
+
"id": "intl/ago-half-step-day",
|
|
2270
|
+
"description": "12 hours make a day.",
|
|
2271
|
+
"section": "11.2",
|
|
2272
|
+
"message": "{{t:ago}}",
|
|
2273
|
+
"payload": {
|
|
2274
|
+
"t": 43200000
|
|
2275
|
+
},
|
|
2276
|
+
"locale": "en",
|
|
2277
|
+
"expected": {
|
|
2278
|
+
"format": {
|
|
2279
|
+
"api": "RelativeTimeFormat",
|
|
2280
|
+
"options": {
|
|
2281
|
+
"numeric": "auto"
|
|
2282
|
+
},
|
|
2283
|
+
"input": [
|
|
2284
|
+
1,
|
|
2285
|
+
"day"
|
|
2286
|
+
]
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
},
|
|
2290
|
+
{
|
|
2291
|
+
"id": "intl/ago-half-step-week",
|
|
2292
|
+
"description": "4 days make a week.",
|
|
2293
|
+
"section": "11.2",
|
|
2294
|
+
"message": "{{t:ago}}",
|
|
2295
|
+
"payload": {
|
|
2296
|
+
"t": 345600000
|
|
2297
|
+
},
|
|
2298
|
+
"locale": "en",
|
|
2299
|
+
"expected": {
|
|
2300
|
+
"format": {
|
|
2301
|
+
"api": "RelativeTimeFormat",
|
|
2302
|
+
"options": {
|
|
2303
|
+
"numeric": "auto"
|
|
2304
|
+
},
|
|
2305
|
+
"input": [
|
|
2306
|
+
1,
|
|
2307
|
+
"week"
|
|
2308
|
+
]
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
},
|
|
2312
|
+
{
|
|
2313
|
+
"id": "intl/ago-half-step-month",
|
|
2314
|
+
"description": "3 weeks make a month.",
|
|
2315
|
+
"section": "11.2",
|
|
2316
|
+
"message": "{{t:ago}}",
|
|
2317
|
+
"payload": {
|
|
2318
|
+
"t": 1814400000
|
|
2319
|
+
},
|
|
2320
|
+
"locale": "en",
|
|
2321
|
+
"expected": {
|
|
2322
|
+
"format": {
|
|
2323
|
+
"api": "RelativeTimeFormat",
|
|
2324
|
+
"options": {
|
|
2325
|
+
"numeric": "auto"
|
|
2326
|
+
},
|
|
2327
|
+
"input": [
|
|
2328
|
+
1,
|
|
2329
|
+
"month"
|
|
2330
|
+
]
|
|
2331
|
+
}
|
|
2332
|
+
}
|
|
2333
|
+
},
|
|
2334
|
+
{
|
|
2335
|
+
"id": "intl/ago-half-step-year",
|
|
2336
|
+
"description": "6 months make a year.",
|
|
2337
|
+
"section": "11.2",
|
|
2338
|
+
"message": "{{t:ago}}",
|
|
2339
|
+
"payload": {
|
|
2340
|
+
"t": 15724800000
|
|
2341
|
+
},
|
|
2342
|
+
"locale": "en",
|
|
2343
|
+
"expected": {
|
|
2344
|
+
"format": {
|
|
2345
|
+
"api": "RelativeTimeFormat",
|
|
2346
|
+
"options": {
|
|
2347
|
+
"numeric": "auto"
|
|
2348
|
+
},
|
|
2349
|
+
"input": [
|
|
2350
|
+
1,
|
|
2351
|
+
"year"
|
|
2352
|
+
]
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
},
|
|
2356
|
+
{
|
|
2357
|
+
"id": "intl/ago-under-half-step-not-taken",
|
|
2358
|
+
"description": "A step whose count rounds below one is not taken, so 29 seconds stay seconds.",
|
|
2359
|
+
"section": "11.2",
|
|
2360
|
+
"message": "{{t:ago}}",
|
|
2361
|
+
"payload": {
|
|
2362
|
+
"t": 29000
|
|
2363
|
+
},
|
|
2364
|
+
"locale": "en",
|
|
2365
|
+
"expected": {
|
|
2366
|
+
"format": {
|
|
2367
|
+
"api": "RelativeTimeFormat",
|
|
2368
|
+
"options": {
|
|
2369
|
+
"numeric": "auto"
|
|
2370
|
+
},
|
|
2371
|
+
"input": [
|
|
2372
|
+
29,
|
|
2373
|
+
"second"
|
|
2374
|
+
]
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
},
|
|
2378
|
+
{
|
|
2379
|
+
"id": "intl/ago-under-half-second-is-zero",
|
|
2380
|
+
"description": "A delta under half a second is a count of zero seconds, which the host phrases as the present.",
|
|
2381
|
+
"section": "11.2",
|
|
2382
|
+
"message": "{{t:ago}}",
|
|
2383
|
+
"payload": {
|
|
2384
|
+
"t": 499
|
|
2385
|
+
},
|
|
2386
|
+
"locale": "en",
|
|
2387
|
+
"expected": {
|
|
2388
|
+
"format": {
|
|
2389
|
+
"api": "RelativeTimeFormat",
|
|
2390
|
+
"options": {
|
|
2391
|
+
"numeric": "auto"
|
|
2392
|
+
},
|
|
2393
|
+
"input": [
|
|
2394
|
+
0,
|
|
2395
|
+
"second"
|
|
2396
|
+
]
|
|
2397
|
+
}
|
|
2398
|
+
}
|
|
2399
|
+
},
|
|
2400
|
+
{
|
|
2401
|
+
"id": "intl/ago-zero",
|
|
2402
|
+
"description": "A delta of zero is a count of zero seconds.",
|
|
2403
|
+
"section": "11.2",
|
|
2404
|
+
"message": "{{t:ago}}",
|
|
2405
|
+
"payload": {
|
|
2406
|
+
"t": 0
|
|
2407
|
+
},
|
|
2408
|
+
"locale": "en",
|
|
2409
|
+
"expected": {
|
|
2410
|
+
"format": {
|
|
2411
|
+
"api": "RelativeTimeFormat",
|
|
2412
|
+
"options": {
|
|
2413
|
+
"numeric": "auto"
|
|
2414
|
+
},
|
|
2415
|
+
"input": [
|
|
2416
|
+
0,
|
|
2417
|
+
"second"
|
|
2418
|
+
]
|
|
2419
|
+
}
|
|
2420
|
+
}
|
|
2421
|
+
},
|
|
2422
|
+
{
|
|
2423
|
+
"id": "intl/ago-month-is-thirteen-thirds-of-a-week",
|
|
2424
|
+
"description": "The month is thirteen thirds of a week, so 24 weeks are six months and then a year.",
|
|
2425
|
+
"section": "11.2",
|
|
2426
|
+
"message": "{{t:ago}}",
|
|
2427
|
+
"payload": {
|
|
2428
|
+
"t": 14515200000
|
|
2429
|
+
},
|
|
2430
|
+
"locale": "en",
|
|
2431
|
+
"expected": {
|
|
2432
|
+
"format": {
|
|
2433
|
+
"api": "RelativeTimeFormat",
|
|
2434
|
+
"options": {
|
|
2435
|
+
"numeric": "auto"
|
|
2436
|
+
},
|
|
2437
|
+
"input": [
|
|
2438
|
+
1,
|
|
2439
|
+
"year"
|
|
2440
|
+
]
|
|
2441
|
+
}
|
|
2442
|
+
}
|
|
2443
|
+
},
|
|
2444
|
+
{
|
|
2445
|
+
"id": "intl/ago-top-rung-rounds",
|
|
2446
|
+
"description": "The year is climbed with the same rounding: 18 months are a year and a half, and so two years.",
|
|
2447
|
+
"section": "11.2",
|
|
2448
|
+
"message": "{{t:ago}}",
|
|
2449
|
+
"payload": {
|
|
2450
|
+
"t": 47174400000
|
|
2451
|
+
},
|
|
2452
|
+
"locale": "en",
|
|
2453
|
+
"expected": {
|
|
2454
|
+
"format": {
|
|
2455
|
+
"api": "RelativeTimeFormat",
|
|
2456
|
+
"options": {
|
|
2457
|
+
"numeric": "auto"
|
|
2458
|
+
},
|
|
2459
|
+
"input": [
|
|
2460
|
+
2,
|
|
2461
|
+
"year"
|
|
2462
|
+
]
|
|
2463
|
+
}
|
|
2464
|
+
}
|
|
2465
|
+
},
|
|
2466
|
+
{
|
|
2467
|
+
"id": "intl/ago-runs-out-at-year",
|
|
2468
|
+
"description": "The year is where the climb runs out in any case.",
|
|
2469
|
+
"section": "11.2",
|
|
2470
|
+
"message": "{{t:ago}}",
|
|
2471
|
+
"payload": {
|
|
2472
|
+
"t": -943488000000
|
|
2473
|
+
},
|
|
2474
|
+
"locale": "en",
|
|
2475
|
+
"expected": {
|
|
2476
|
+
"format": {
|
|
2477
|
+
"api": "RelativeTimeFormat",
|
|
2478
|
+
"options": {
|
|
2479
|
+
"numeric": "auto"
|
|
2480
|
+
},
|
|
2481
|
+
"input": [
|
|
2482
|
+
-30,
|
|
2483
|
+
"year"
|
|
2484
|
+
]
|
|
2485
|
+
}
|
|
2486
|
+
}
|
|
2487
|
+
},
|
|
2488
|
+
{
|
|
2489
|
+
"id": "intl/ago-named-unit-stops",
|
|
2490
|
+
"description": "A format property names the unit ago stops at whatever the count is there.",
|
|
2491
|
+
"section": "11.2",
|
|
2492
|
+
"message": "{{t:ago}}",
|
|
2493
|
+
"payload": {
|
|
2494
|
+
"t": -172800000
|
|
2495
|
+
},
|
|
2496
|
+
"props": {
|
|
2497
|
+
"ago": {
|
|
2498
|
+
"format": "hour"
|
|
2499
|
+
}
|
|
2500
|
+
},
|
|
2501
|
+
"locale": "en",
|
|
2502
|
+
"expected": {
|
|
2503
|
+
"format": {
|
|
2504
|
+
"api": "RelativeTimeFormat",
|
|
2505
|
+
"options": {
|
|
2506
|
+
"numeric": "auto"
|
|
2507
|
+
},
|
|
2508
|
+
"input": [
|
|
2509
|
+
-48,
|
|
2510
|
+
"hour"
|
|
2511
|
+
]
|
|
2512
|
+
}
|
|
2513
|
+
}
|
|
2514
|
+
},
|
|
2515
|
+
{
|
|
2516
|
+
"id": "intl/ago-named-unit-zero-count",
|
|
2517
|
+
"description": "format day at a delta of three hours is a count of zero days.",
|
|
2518
|
+
"section": "11.2",
|
|
2519
|
+
"message": "{{t:ago}}",
|
|
2520
|
+
"payload": {
|
|
2521
|
+
"t": 10800000
|
|
2522
|
+
},
|
|
2523
|
+
"props": {
|
|
2524
|
+
"ago": {
|
|
2525
|
+
"format": "day"
|
|
2526
|
+
}
|
|
2527
|
+
},
|
|
2528
|
+
"locale": "en",
|
|
2529
|
+
"expected": {
|
|
2530
|
+
"format": {
|
|
2531
|
+
"api": "RelativeTimeFormat",
|
|
2532
|
+
"options": {
|
|
2533
|
+
"numeric": "auto"
|
|
2534
|
+
},
|
|
2535
|
+
"input": [
|
|
2536
|
+
0,
|
|
2537
|
+
"day"
|
|
2538
|
+
]
|
|
2539
|
+
}
|
|
2540
|
+
}
|
|
2541
|
+
},
|
|
2542
|
+
{
|
|
2543
|
+
"id": "intl/ago-named-unit-large-count",
|
|
2544
|
+
"description": "format second at a delta of 800 days is a count of 69 120 000 seconds.",
|
|
2545
|
+
"section": "11.2",
|
|
2546
|
+
"message": "{{t:ago}}",
|
|
2547
|
+
"payload": {
|
|
2548
|
+
"t": 69120000000
|
|
2549
|
+
},
|
|
2550
|
+
"props": {
|
|
2551
|
+
"ago": {
|
|
2552
|
+
"format": "second"
|
|
2553
|
+
}
|
|
2554
|
+
},
|
|
2555
|
+
"locale": "en",
|
|
2556
|
+
"expected": {
|
|
2557
|
+
"format": {
|
|
2558
|
+
"api": "RelativeTimeFormat",
|
|
2559
|
+
"options": {
|
|
2560
|
+
"numeric": "auto"
|
|
2561
|
+
},
|
|
2562
|
+
"input": [
|
|
2563
|
+
69120000,
|
|
2564
|
+
"second"
|
|
2565
|
+
]
|
|
2566
|
+
}
|
|
2567
|
+
}
|
|
2568
|
+
},
|
|
2569
|
+
{
|
|
2570
|
+
"id": "intl/ago-named-unit-climbs-past-automatic-stop",
|
|
2571
|
+
"description": "A named unit above where the climb would stop is still climbed to, with the same rounding.",
|
|
2572
|
+
"section": "11.2",
|
|
2573
|
+
"message": "{{t:ago}}",
|
|
2574
|
+
"payload": {
|
|
2575
|
+
"t": 604800000
|
|
2576
|
+
},
|
|
2577
|
+
"props": {
|
|
2578
|
+
"ago": {
|
|
2579
|
+
"format": "month"
|
|
2580
|
+
}
|
|
2581
|
+
},
|
|
2582
|
+
"locale": "en",
|
|
2583
|
+
"expected": {
|
|
2584
|
+
"format": {
|
|
2585
|
+
"api": "RelativeTimeFormat",
|
|
2586
|
+
"options": {
|
|
2587
|
+
"numeric": "auto"
|
|
2588
|
+
},
|
|
2589
|
+
"input": [
|
|
2590
|
+
0,
|
|
2591
|
+
"month"
|
|
2592
|
+
]
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2595
|
+
},
|
|
2596
|
+
{
|
|
2597
|
+
"id": "intl/ago-named-unit-same-rounding",
|
|
2598
|
+
"description": "A named unit climbs the ladder with the same rounding, so three and a half days stop at four days.",
|
|
2599
|
+
"section": "11.2",
|
|
2600
|
+
"message": "{{t:ago}}",
|
|
2601
|
+
"payload": {
|
|
2602
|
+
"t": 302400000
|
|
2603
|
+
},
|
|
2604
|
+
"props": {
|
|
2605
|
+
"ago": {
|
|
2606
|
+
"format": "day"
|
|
2607
|
+
}
|
|
2608
|
+
},
|
|
2609
|
+
"locale": "en",
|
|
2610
|
+
"expected": {
|
|
2611
|
+
"format": {
|
|
2612
|
+
"api": "RelativeTimeFormat",
|
|
2613
|
+
"options": {
|
|
2614
|
+
"numeric": "auto"
|
|
2615
|
+
},
|
|
2616
|
+
"input": [
|
|
2617
|
+
4,
|
|
2618
|
+
"day"
|
|
2619
|
+
]
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2622
|
+
},
|
|
2623
|
+
{
|
|
2624
|
+
"id": "intl/ago-named-unit-plural",
|
|
2625
|
+
"description": "A unit is named in the singular or the plural, so days names the day.",
|
|
2626
|
+
"section": "11.2",
|
|
2627
|
+
"message": "{{t:ago}}",
|
|
2628
|
+
"payload": {
|
|
2629
|
+
"t": -604800000
|
|
2630
|
+
},
|
|
2631
|
+
"props": {
|
|
2632
|
+
"ago": {
|
|
2633
|
+
"format": "days"
|
|
2634
|
+
}
|
|
2635
|
+
},
|
|
2636
|
+
"locale": "en",
|
|
2637
|
+
"expected": {
|
|
2638
|
+
"format": {
|
|
2639
|
+
"api": "RelativeTimeFormat",
|
|
2640
|
+
"options": {
|
|
2641
|
+
"numeric": "auto"
|
|
2642
|
+
},
|
|
2643
|
+
"input": [
|
|
2644
|
+
-7,
|
|
2645
|
+
"day"
|
|
2646
|
+
]
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
2649
|
+
},
|
|
2650
|
+
{
|
|
2651
|
+
"id": "intl/ago-format-auto-is-automatic",
|
|
2652
|
+
"description": "The format value auto is the automatic selection a layer naming none leaves in place.",
|
|
2653
|
+
"section": "11.2",
|
|
2654
|
+
"message": "{{t:ago}}",
|
|
2655
|
+
"payload": {
|
|
2656
|
+
"t": -604800000
|
|
2657
|
+
},
|
|
2658
|
+
"props": {
|
|
2659
|
+
"ago": {
|
|
2660
|
+
"format": "auto"
|
|
2661
|
+
}
|
|
2662
|
+
},
|
|
2663
|
+
"locale": "en",
|
|
2664
|
+
"expected": {
|
|
2665
|
+
"format": {
|
|
2666
|
+
"api": "RelativeTimeFormat",
|
|
2667
|
+
"options": {
|
|
2668
|
+
"numeric": "auto"
|
|
2669
|
+
},
|
|
2670
|
+
"input": [
|
|
2671
|
+
-1,
|
|
2672
|
+
"week"
|
|
2673
|
+
]
|
|
2674
|
+
}
|
|
2675
|
+
}
|
|
2676
|
+
},
|
|
2677
|
+
{
|
|
2678
|
+
"id": "intl/ago-format-from-defaults",
|
|
2679
|
+
"description": "The unit is named by a format property in the implementation defaults like any other layer.",
|
|
2680
|
+
"section": "11.2",
|
|
2681
|
+
"message": "{{t:ago}}",
|
|
2682
|
+
"payload": {
|
|
2683
|
+
"t": -604800000
|
|
2684
|
+
},
|
|
2685
|
+
"locale": "en",
|
|
2686
|
+
"defaults": {
|
|
2687
|
+
"ago": {
|
|
2688
|
+
"format": "days"
|
|
2689
|
+
}
|
|
2690
|
+
},
|
|
2691
|
+
"expected": {
|
|
2692
|
+
"format": {
|
|
2693
|
+
"api": "RelativeTimeFormat",
|
|
2694
|
+
"options": {
|
|
2695
|
+
"numeric": "auto"
|
|
2696
|
+
},
|
|
2697
|
+
"input": [
|
|
2698
|
+
-7,
|
|
2699
|
+
"day"
|
|
2700
|
+
]
|
|
2701
|
+
}
|
|
2702
|
+
}
|
|
2703
|
+
},
|
|
2704
|
+
{
|
|
2705
|
+
"id": "intl/ago-format-from-wrapper",
|
|
2706
|
+
"description": "The unit is named by a format property in the wrapper's props over the layers beneath.",
|
|
2707
|
+
"section": "11.2",
|
|
2708
|
+
"message": "{{t:ago}}",
|
|
2709
|
+
"payload": {
|
|
2710
|
+
"t": {
|
|
2711
|
+
"value": -172800000,
|
|
2712
|
+
"props": {
|
|
2713
|
+
"ago": {
|
|
2714
|
+
"format": "hour"
|
|
2715
|
+
}
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
},
|
|
2719
|
+
"props": {
|
|
2720
|
+
"ago": {
|
|
2721
|
+
"format": "day"
|
|
2722
|
+
}
|
|
2723
|
+
},
|
|
2724
|
+
"locale": "en",
|
|
2725
|
+
"expected": {
|
|
2726
|
+
"format": {
|
|
2727
|
+
"api": "RelativeTimeFormat",
|
|
2728
|
+
"options": {
|
|
2729
|
+
"numeric": "auto"
|
|
2730
|
+
},
|
|
2731
|
+
"input": [
|
|
2732
|
+
-48,
|
|
2733
|
+
"hour"
|
|
2734
|
+
]
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
},
|
|
2738
|
+
{
|
|
2739
|
+
"id": "intl/ago-format-year-names-the-year",
|
|
2740
|
+
"description": "A format of year names the year.",
|
|
2741
|
+
"section": "11.2",
|
|
2742
|
+
"message": "{{t:ago}}",
|
|
2743
|
+
"payload": {
|
|
2744
|
+
"t": 47174400000
|
|
2745
|
+
},
|
|
2746
|
+
"props": {
|
|
2747
|
+
"ago": {
|
|
2748
|
+
"format": "year"
|
|
2749
|
+
}
|
|
2750
|
+
},
|
|
2751
|
+
"locale": "en",
|
|
2752
|
+
"expected": {
|
|
2753
|
+
"format": {
|
|
2754
|
+
"api": "RelativeTimeFormat",
|
|
2755
|
+
"options": {
|
|
2756
|
+
"numeric": "auto"
|
|
2757
|
+
},
|
|
2758
|
+
"input": [
|
|
2759
|
+
2,
|
|
2760
|
+
"year"
|
|
2761
|
+
]
|
|
2762
|
+
}
|
|
2763
|
+
}
|
|
2764
|
+
},
|
|
2765
|
+
{
|
|
2766
|
+
"id": "intl/ago-format-years-names-the-year",
|
|
2767
|
+
"description": "A format of years names the year.",
|
|
2768
|
+
"section": "11.2",
|
|
2769
|
+
"message": "{{t:ago}}",
|
|
2770
|
+
"payload": {
|
|
2771
|
+
"t": 47174400000
|
|
2772
|
+
},
|
|
2773
|
+
"props": {
|
|
2774
|
+
"ago": {
|
|
2775
|
+
"format": "years"
|
|
2776
|
+
}
|
|
2777
|
+
},
|
|
2778
|
+
"locale": "en",
|
|
2779
|
+
"expected": {
|
|
2780
|
+
"format": {
|
|
2781
|
+
"api": "RelativeTimeFormat",
|
|
2782
|
+
"options": {
|
|
2783
|
+
"numeric": "auto"
|
|
2784
|
+
},
|
|
2785
|
+
"input": [
|
|
2786
|
+
2,
|
|
2787
|
+
"year"
|
|
2788
|
+
]
|
|
2789
|
+
}
|
|
2790
|
+
}
|
|
2791
|
+
},
|
|
2792
|
+
{
|
|
2793
|
+
"id": "intl/ago-format-case-differs-fails",
|
|
2794
|
+
"description": "Unit names are compared exactly, so a format of YEAR names none of them and the placeholder takes the chain with a failed-modifier report.",
|
|
2795
|
+
"section": "11.2",
|
|
2796
|
+
"message": "{{t:ago; default:D}}",
|
|
2797
|
+
"payload": {
|
|
2798
|
+
"t": -604800000
|
|
2799
|
+
},
|
|
2800
|
+
"props": {
|
|
2801
|
+
"ago": {
|
|
2802
|
+
"format": "YEAR"
|
|
2803
|
+
}
|
|
2804
|
+
},
|
|
2805
|
+
"locale": "en",
|
|
2806
|
+
"key": "intl.ago-format-case",
|
|
2807
|
+
"expected": {
|
|
2808
|
+
"output": "D",
|
|
2809
|
+
"reports": [
|
|
2810
|
+
{
|
|
2811
|
+
"code": "failed-modifier",
|
|
2812
|
+
"origin": "payload",
|
|
2813
|
+
"key": "intl.ago-format-case"
|
|
2814
|
+
}
|
|
2815
|
+
]
|
|
2816
|
+
}
|
|
2817
|
+
},
|
|
2818
|
+
{
|
|
2819
|
+
"id": "intl/ago-format-host-unit-fails",
|
|
2820
|
+
"description": "A format naming a unit from the host's vocabulary that the ladder does not climb is a property the modifier cannot process.",
|
|
2821
|
+
"section": "11.2",
|
|
2822
|
+
"message": "{{t:ago; default:D}}",
|
|
2823
|
+
"payload": {
|
|
2824
|
+
"t": -604800000
|
|
2825
|
+
},
|
|
2826
|
+
"props": {
|
|
2827
|
+
"ago": {
|
|
2828
|
+
"format": "quarter"
|
|
2829
|
+
}
|
|
2830
|
+
},
|
|
2831
|
+
"locale": "en",
|
|
2832
|
+
"key": "intl.ago-format-quarter",
|
|
2833
|
+
"expected": {
|
|
2834
|
+
"output": "D",
|
|
2835
|
+
"reports": [
|
|
2836
|
+
{
|
|
2837
|
+
"code": "failed-modifier",
|
|
2838
|
+
"origin": "payload",
|
|
2839
|
+
"key": "intl.ago-format-quarter"
|
|
2840
|
+
}
|
|
2841
|
+
]
|
|
2842
|
+
}
|
|
2843
|
+
},
|
|
2844
|
+
{
|
|
2845
|
+
"id": "intl/ago-format-null-fails",
|
|
2846
|
+
"description": "A format a layer holds null under is named and names no unit, so the placeholder takes the chain.",
|
|
2847
|
+
"section": "11.2",
|
|
2848
|
+
"message": "{{t:ago; default:D}}",
|
|
2849
|
+
"payload": {
|
|
2850
|
+
"t": -604800000
|
|
2851
|
+
},
|
|
2852
|
+
"props": {
|
|
2853
|
+
"ago": {
|
|
2854
|
+
"format": null
|
|
2855
|
+
}
|
|
2856
|
+
},
|
|
2857
|
+
"locale": "en",
|
|
2858
|
+
"key": "intl.ago-format-null",
|
|
2859
|
+
"expected": {
|
|
2860
|
+
"output": "D",
|
|
2861
|
+
"reports": [
|
|
2862
|
+
{
|
|
2863
|
+
"code": "failed-modifier",
|
|
2864
|
+
"origin": "payload",
|
|
2865
|
+
"key": "intl.ago-format-null"
|
|
2866
|
+
}
|
|
2867
|
+
]
|
|
2868
|
+
}
|
|
2869
|
+
},
|
|
2870
|
+
{
|
|
2871
|
+
"id": "intl/ago-numeric-auto-by-default",
|
|
2872
|
+
"description": "Where no layer names numeric it is auto, so a count of one day asks for the host's non-numeric phrasing.",
|
|
2873
|
+
"section": "11.2",
|
|
2874
|
+
"message": "{{t:ago}}",
|
|
2875
|
+
"payload": {
|
|
2876
|
+
"t": -86400000
|
|
2877
|
+
},
|
|
2878
|
+
"locale": "en",
|
|
2879
|
+
"expected": {
|
|
2880
|
+
"format": {
|
|
2881
|
+
"api": "RelativeTimeFormat",
|
|
2882
|
+
"options": {
|
|
2883
|
+
"numeric": "auto"
|
|
2884
|
+
},
|
|
2885
|
+
"input": [
|
|
2886
|
+
-1,
|
|
2887
|
+
"day"
|
|
2888
|
+
]
|
|
2889
|
+
}
|
|
2890
|
+
}
|
|
2891
|
+
},
|
|
2892
|
+
{
|
|
2893
|
+
"id": "intl/ago-numeric-always-from-props",
|
|
2894
|
+
"description": "A layer naming numeric decides it like any other property.",
|
|
2895
|
+
"section": "11.2",
|
|
2896
|
+
"message": "{{t:ago}}",
|
|
2897
|
+
"payload": {
|
|
2898
|
+
"t": -86400000
|
|
2899
|
+
},
|
|
2900
|
+
"props": {
|
|
2901
|
+
"ago": {
|
|
2902
|
+
"numeric": "always"
|
|
2903
|
+
}
|
|
2904
|
+
},
|
|
2905
|
+
"locale": "en",
|
|
2906
|
+
"expected": {
|
|
2907
|
+
"format": {
|
|
2908
|
+
"api": "RelativeTimeFormat",
|
|
2909
|
+
"options": {
|
|
2910
|
+
"numeric": "always"
|
|
2911
|
+
},
|
|
2912
|
+
"input": [
|
|
2913
|
+
-1,
|
|
2914
|
+
"day"
|
|
2915
|
+
]
|
|
2916
|
+
}
|
|
2917
|
+
}
|
|
2918
|
+
},
|
|
2919
|
+
{
|
|
2920
|
+
"id": "intl/ago-numeric-always-from-defaults",
|
|
2921
|
+
"description": "The implementation defaults name numeric over the auto the section states.",
|
|
2922
|
+
"section": "11.2",
|
|
2923
|
+
"message": "{{t:ago}}",
|
|
2924
|
+
"payload": {
|
|
2925
|
+
"t": -86400000
|
|
2926
|
+
},
|
|
2927
|
+
"locale": "en",
|
|
2928
|
+
"defaults": {
|
|
2929
|
+
"ago": {
|
|
2930
|
+
"numeric": "always"
|
|
2931
|
+
}
|
|
2932
|
+
},
|
|
2933
|
+
"expected": {
|
|
2934
|
+
"format": {
|
|
2935
|
+
"api": "RelativeTimeFormat",
|
|
2936
|
+
"options": {
|
|
2937
|
+
"numeric": "always"
|
|
2938
|
+
},
|
|
2939
|
+
"input": [
|
|
2940
|
+
-1,
|
|
2941
|
+
"day"
|
|
2942
|
+
]
|
|
2943
|
+
}
|
|
2944
|
+
}
|
|
2945
|
+
},
|
|
2946
|
+
{
|
|
2947
|
+
"id": "intl/ago-half-hour-ago",
|
|
2948
|
+
"description": "Half an hour ago rounds away from zero to one hour, the same distance as half an hour from now.",
|
|
2949
|
+
"section": "11.2",
|
|
2950
|
+
"message": "{{t:ago}}",
|
|
2951
|
+
"payload": {
|
|
2952
|
+
"t": -1800000
|
|
2953
|
+
},
|
|
2954
|
+
"locale": "en",
|
|
2955
|
+
"expected": {
|
|
2956
|
+
"format": {
|
|
2957
|
+
"api": "RelativeTimeFormat",
|
|
2958
|
+
"options": {
|
|
2959
|
+
"numeric": "auto"
|
|
2960
|
+
},
|
|
2961
|
+
"input": [
|
|
2962
|
+
-1,
|
|
2963
|
+
"hour"
|
|
2964
|
+
]
|
|
2965
|
+
}
|
|
2966
|
+
}
|
|
2967
|
+
},
|
|
2968
|
+
{
|
|
2969
|
+
"id": "intl/ago-symmetry-future",
|
|
2970
|
+
"description": "An hour and a half from now is two hours.",
|
|
2971
|
+
"section": "11.2",
|
|
2972
|
+
"message": "{{t:ago}}",
|
|
2973
|
+
"payload": {
|
|
2974
|
+
"t": 5400000
|
|
2975
|
+
},
|
|
2976
|
+
"locale": "en",
|
|
2977
|
+
"expected": {
|
|
2978
|
+
"format": {
|
|
2979
|
+
"api": "RelativeTimeFormat",
|
|
2980
|
+
"options": {
|
|
2981
|
+
"numeric": "auto"
|
|
2982
|
+
},
|
|
2983
|
+
"input": [
|
|
2984
|
+
2,
|
|
2985
|
+
"hour"
|
|
2986
|
+
]
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2989
|
+
},
|
|
2990
|
+
{
|
|
2991
|
+
"id": "intl/ago-symmetry-past",
|
|
2992
|
+
"description": "An hour and a half ago is two hours, the negation of its future.",
|
|
2993
|
+
"section": "11.2",
|
|
2994
|
+
"message": "{{t:ago}}",
|
|
2995
|
+
"payload": {
|
|
2996
|
+
"t": -5400000
|
|
2997
|
+
},
|
|
2998
|
+
"locale": "en",
|
|
2999
|
+
"expected": {
|
|
3000
|
+
"format": {
|
|
3001
|
+
"api": "RelativeTimeFormat",
|
|
3002
|
+
"options": {
|
|
3003
|
+
"numeric": "auto"
|
|
3004
|
+
},
|
|
3005
|
+
"input": [
|
|
3006
|
+
-2,
|
|
3007
|
+
"hour"
|
|
3008
|
+
]
|
|
3009
|
+
}
|
|
3010
|
+
}
|
|
3011
|
+
},
|
|
3012
|
+
{
|
|
3013
|
+
"id": "intl/ago-half-second-future",
|
|
3014
|
+
"description": "Half a second from now rounds away from zero to one second.",
|
|
3015
|
+
"section": "11.2",
|
|
3016
|
+
"message": "{{t:ago}}",
|
|
3017
|
+
"payload": {
|
|
3018
|
+
"t": 500
|
|
3019
|
+
},
|
|
3020
|
+
"locale": "en",
|
|
3021
|
+
"expected": {
|
|
3022
|
+
"format": {
|
|
3023
|
+
"api": "RelativeTimeFormat",
|
|
3024
|
+
"options": {
|
|
3025
|
+
"numeric": "auto"
|
|
3026
|
+
},
|
|
3027
|
+
"input": [
|
|
3028
|
+
1,
|
|
3029
|
+
"second"
|
|
3030
|
+
]
|
|
3031
|
+
}
|
|
3032
|
+
}
|
|
3033
|
+
},
|
|
3034
|
+
{
|
|
3035
|
+
"id": "intl/ago-half-second-past",
|
|
3036
|
+
"description": "Half a second ago rounds away from zero to one second, the negation of its future.",
|
|
3037
|
+
"section": "11.2",
|
|
3038
|
+
"message": "{{t:ago}}",
|
|
3039
|
+
"payload": {
|
|
3040
|
+
"t": -500
|
|
3041
|
+
},
|
|
3042
|
+
"locale": "en",
|
|
3043
|
+
"expected": {
|
|
3044
|
+
"format": {
|
|
3045
|
+
"api": "RelativeTimeFormat",
|
|
3046
|
+
"options": {
|
|
3047
|
+
"numeric": "auto"
|
|
3048
|
+
},
|
|
3049
|
+
"input": [
|
|
3050
|
+
-1,
|
|
3051
|
+
"second"
|
|
3052
|
+
]
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
}
|
|
3056
|
+
]
|
|
3057
|
+
}
|