]>
Commit | Line | Data |
---|---|---|
51004dcb | 1 | // Copyright (c) 2008-2013 International Business Machines |
46f4442e A |
2 | // Corporation and others. All Rights Reserved. |
3 | calendar:table(nofallback) { | |
4 | Info { | |
5 | Description { "These are the data driven calendar tests" } | |
6 | LongDescription { "Data for data driven calendar tests." } | |
7 | } | |
8 | TestData { | |
9 | TestCalendarConversion { | |
10 | Headers { "locale","from","to" } | |
11 | Info { | |
12 | Description { "Test data for calendar conversion :" } | |
13 | } | |
14 | Settings { | |
15 | { | |
16 | ToCalendar { "en_US@calendar=gregorian" } | |
17 | Type { "convert_fwd" } | |
18 | }, | |
19 | { | |
20 | ToCalendar { "en_US@calendar=gregorian" } | |
21 | Type { "convert_rev" } | |
22 | }, | |
23 | } | |
24 | Cases { | |
25 | // taiwanese calendar | |
26 | // "0/1/1912/june/4 == gregorian year=1912, ERA=AD, same month, same day | |
27 | { | |
28 | "en_US@calendar=roc", | |
29 | "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw | |
30 | "ERA=1,YEAR=1912,MONTH=,DATE=" // greg | |
31 | }, | |
32 | { | |
33 | "en_US@calendar=roc", | |
34 | "ERA=1,YEAR=3,MONTH=FEBRUARY,DATE=12", // tw | |
35 | "ERA=1,YEAR=1914,MONTH=,DATE=" // greg | |
36 | }, | |
37 | { | |
38 | "en_US@calendar=roc", | |
39 | "ERA=1,YEAR=96,MONTH=FEBRUARY,DATE=12", // tw | |
40 | "ERA=1,YEAR=2007,MONTH=,DATE=" // greg | |
41 | }, | |
42 | // before 1912: | |
43 | // [before minguo]2 1[month] 24[day] -> 1910-1-24 | |
44 | { | |
45 | "en_US@calendar=roc", | |
46 | "ERA=0,YEAR=2,MONTH=JANUARY,DATE=24", // tw | |
47 | "ERA=1,YEAR=1910,MONTH=JANUARY,DATE=24", // greg | |
48 | }, | |
49 | ||
50 | // chinese calendar | |
51 | // (0-based months) | |
52 | { | |
53 | "en_US@calendar=chinese", | |
54 | "EXTENDED_YEAR=4601,MONTH=6,DATE=28,IS_LEAP_MONTH=0", // ch | |
55 | "YEAR=1964,MONTH=8,DATE=4", // greg | |
56 | }, | |
57 | { | |
58 | "en_US@calendar=chinese", | |
59 | "EXTENDED_YEAR=4601,MONTH=6,DATE=29,IS_LEAP_MONTH=0", // ch | |
60 | "YEAR=1964,MONTH=8,DATE=5", // greg | |
61 | }, | |
62 | { | |
63 | "en_US@calendar=chinese", | |
64 | "EXTENDED_YEAR=4601,MONTH=7,DATE=1,IS_LEAP_MONTH=0", // ch | |
65 | "YEAR=1964,MONTH=8,DATE=6", // greg | |
66 | }, | |
67 | { | |
68 | "en_US@calendar=chinese", | |
69 | "EXTENDED_YEAR=4601,MONTH=7,DATE=2,IS_LEAP_MONTH=0", // ch | |
70 | "YEAR=1964,MONTH=8,DATE=7", // greg | |
71 | }, | |
72 | { | |
73 | "en_US@calendar=chinese", | |
74 | "EXTENDED_YEAR=4598,MONTH=10,DATE=18,IS_LEAP_MONTH=0", // ch | |
75 | "YEAR=1961,MONTH=11,DATE=25", // greg | |
76 | }, | |
77 | { | |
78 | "en_US@calendar=chinese", | |
79 | "EXTENDED_YEAR=4636,MONTH=3,DATE=21,IS_LEAP_MONTH=0", // ch | |
80 | "YEAR=1999,MONTH=5,DATE=4", // greg | |
81 | }, | |
82 | ||
83 | { | |
84 | "en_US@calendar=chinese", | |
85 | "EXTENDED_YEAR=4627,MONTH=3,DATE=29,IS_LEAP_MONTH=0", // ch | |
86 | "YEAR=1990,MONTH=4,DATE=23", // greg | |
87 | }, | |
88 | { | |
89 | "en_US@calendar=chinese", | |
90 | "EXTENDED_YEAR=4627,MONTH=4,DATE=1,IS_LEAP_MONTH=0", // ch | |
91 | "YEAR=1990,MONTH=4,DATE=24", // greg | |
92 | }, | |
93 | { | |
94 | "en_US@calendar=chinese", | |
95 | "EXTENDED_YEAR=4627,MONTH=4,DATE=30,IS_LEAP_MONTH=0", // ch | |
96 | "YEAR=1990,MONTH=5,DATE=22", // greg | |
97 | }, | |
98 | { | |
99 | "en_US@calendar=chinese", | |
100 | "EXTENDED_YEAR=4627,MONTH=4,DATE=1,IS_LEAP_MONTH=1", // ch | |
101 | "YEAR=1990,MONTH=5,DATE=23", // greg | |
102 | }, | |
103 | { | |
104 | "en_US@calendar=chinese", | |
105 | "EXTENDED_YEAR=4627,MONTH=4,DATE=28,IS_LEAP_MONTH=1", // ch | |
106 | "YEAR=1990,MONTH=6,DATE=20", // greg | |
107 | }, | |
108 | { | |
109 | "en_US@calendar=chinese", | |
110 | "EXTENDED_YEAR=4627,MONTH=4,DATE=29,IS_LEAP_MONTH=1", // ch | |
111 | "YEAR=1990,MONTH=6,DATE=21", // greg | |
112 | }, | |
113 | { | |
114 | "en_US@calendar=chinese", | |
115 | "EXTENDED_YEAR=4627,MONTH=5,DATE=1,IS_LEAP_MONTH=0", // ch | |
116 | "YEAR=1990,MONTH=6,DATE=22", // greg | |
117 | }, | |
51004dcb A |
118 | // dangi calendar |
119 | // (0-based months) | |
120 | { | |
121 | "en_US@calendar=dangi", | |
122 | "EXTENDED_YEAR=4297,MONTH=6,DATE=29,IS_LEAP_MONTH=0", // dangi | |
123 | "YEAR=1964,MONTH=8,DATE=5", // greg | |
124 | }, | |
125 | { | |
126 | "en_US@calendar=dangi", | |
127 | "EXTENDED_YEAR=4297,MONTH=7,DATE=1,IS_LEAP_MONTH=0", // dangi | |
128 | "YEAR=1964,MONTH=8,DATE=6", // greg | |
129 | }, | |
130 | { | |
131 | "en_US@calendar=dangi", | |
132 | "EXTENDED_YEAR=4294,MONTH=10,DATE=18,IS_LEAP_MONTH=0", // dangi | |
133 | "YEAR=1961,MONTH=11,DATE=25", // greg | |
134 | }, | |
135 | { | |
136 | "en_US@calendar=dangi", | |
137 | "EXTENDED_YEAR=4323,MONTH=4,DATE=30,IS_LEAP_MONTH=0", // dangi | |
138 | "YEAR=1990,MONTH=5,DATE=22", // greg | |
139 | }, | |
140 | { | |
141 | "en_US@calendar=dangi", | |
142 | "EXTENDED_YEAR=4323,MONTH=4,DATE=1,IS_LEAP_MONTH=1", // dangi | |
143 | "YEAR=1990,MONTH=5,DATE=23", // greg | |
144 | }, | |
145 | { | |
146 | "en_US@calendar=dangi", | |
147 | "EXTENDED_YEAR=4323,MONTH=4,DATE=29,IS_LEAP_MONTH=1", // dangi | |
148 | "YEAR=1990,MONTH=6,DATE=21", // greg | |
149 | }, | |
150 | { | |
151 | "en_US@calendar=dangi", | |
152 | "EXTENDED_YEAR=4323,MONTH=5,DATE=1,IS_LEAP_MONTH=0", // dangi | |
153 | "YEAR=1990,MONTH=6,DATE=22", // greg | |
154 | }, | |
155 | { | |
156 | "en_US@calendar=dangi", | |
157 | "EXTENDED_YEAR=4213,MONTH=9,DATE=1,IS_LEAP_MONTH=0", // dangi | |
158 | "YEAR=1880,MONTH=10,DATE=3", // greg | |
159 | }, | |
160 | { | |
161 | "en_US@calendar=dangi", | |
162 | "EXTENDED_YEAR=4215,MONTH=10,DATE=1,IS_LEAP_MONTH=0", // dangi | |
163 | "YEAR=1882,MONTH=11,DATE=10", // greg | |
164 | }, | |
165 | { | |
166 | "en_US@calendar=dangi", | |
167 | "EXTENDED_YEAR=4230,MONTH=6,DATE=1,IS_LEAP_MONTH=0", // dangi | |
168 | "YEAR=1897,MONTH=6,DATE=29", // greg | |
169 | }, | |
46f4442e A |
170 | } |
171 | } | |
172 | TestCalendarOperations { | |
173 | Headers { "locale","from","operation","params","to" } | |
174 | Info { | |
175 | Description { "Test data for calendar operation :" } | |
176 | } | |
177 | Settings { | |
178 | { | |
179 | Type { "ops" } | |
180 | }, | |
181 | } | |
182 | Cases { | |
183 | //roc | |
184 | { | |
185 | "en_US@calendar=roc", | |
186 | "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw | |
187 | "roll", | |
188 | "DATE=1", // date + 1 | |
189 | "ERA=1,YEAR=1,MONTH=JUNE,DATE=5", // tw | |
190 | }, | |
191 | { | |
192 | "en_US@calendar=roc", | |
193 | "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw | |
194 | "add", | |
195 | "DATE=1", // date + 1 | |
196 | "ERA=1,YEAR=1,MONTH=JUNE,DATE=5", // tw | |
197 | }, | |
198 | { | |
199 | "en_US@calendar=roc", | |
200 | "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw | |
201 | "roll", | |
202 | "YEAR=1", // date + 1 | |
203 | "ERA=1,YEAR=2,MONTH=JUNE,DATE=4", // tw | |
204 | }, | |
205 | { | |
206 | "en_US@calendar=roc", | |
207 | "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw | |
208 | "add", | |
209 | "YEAR=1", // date + 1 | |
210 | "ERA=1,YEAR=2,MONTH=JUNE,DATE=4", // tw | |
211 | }, | |
212 | ||
213 | //chinese add tests | |
214 | { // normal | |
215 | "en_US@calendar=chinese", | |
216 | "EXTENDED_YEAR=4642,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch | |
217 | "add", | |
218 | "MONTH=3", // month + 3 | |
219 | "EXTENDED_YEAR=4642,MONTH=5,DATE=15,IS_LEAP_MONTH=0", // ch | |
220 | }, | |
221 | { // across year | |
222 | "en_US@calendar=chinese", | |
223 | "EXTENDED_YEAR=4639,MONTH=11,DATE=15,IS_LEAP_MONTH=0", // ch | |
224 | "add", | |
225 | "MONTH=1", // month + 1 | |
226 | "EXTENDED_YEAR=4640,MONTH=0,DATE=15,IS_LEAP_MONTH=0", // ch | |
227 | }, | |
228 | { // across year | |
229 | "en_US@calendar=chinese", | |
230 | "EXTENDED_YEAR=4640,MONTH=0,DATE=15,IS_LEAP_MONTH=0", // ch | |
231 | "add", | |
232 | "MONTH=-1", // month - 1 | |
233 | "EXTENDED_YEAR=4639,MONTH=11,DATE=15,IS_LEAP_MONTH=0", // ch | |
234 | }, | |
235 | { // month=3 is a leap month | |
236 | "en_US@calendar=chinese", | |
237 | "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch | |
238 | "add", | |
239 | "MONTH=3", // month + 3 | |
240 | "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch | |
241 | }, | |
242 | { // month=3 is a leap month | |
243 | "en_US@calendar=chinese", | |
244 | "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch | |
245 | "add", | |
246 | "MONTH=2", // month + 2 | |
247 | "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch | |
248 | }, | |
249 | { // month=3 is a leap month | |
250 | "en_US@calendar=chinese", | |
251 | "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=0", // ch | |
252 | "add", | |
253 | "MONTH=1", // month + 1 | |
254 | "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch | |
255 | }, | |
256 | { // month=3 is a leap month | |
257 | "en_US@calendar=chinese", | |
258 | "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch | |
259 | "add", | |
260 | "MONTH=1", // month + 1 | |
261 | "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch | |
262 | }, | |
263 | { // dom should pin | |
264 | "en_US@calendar=chinese", | |
265 | "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch | |
266 | "add", | |
267 | "MONTH=1", // month + 1 | |
268 | "EXTENDED_YEAR=4638,MONTH=3,DATE=29,IS_LEAP_MONTH=1", // ch | |
269 | }, | |
270 | { // dom should pin | |
271 | "en_US@calendar=chinese", | |
272 | "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch | |
273 | "add", | |
274 | "MONTH=2", // month + 2 | |
275 | "EXTENDED_YEAR=4638,MONTH=4,DATE=30,IS_LEAP_MONTH=0", // ch | |
276 | }, | |
277 | { // dom should pin | |
278 | "en_US@calendar=chinese", | |
279 | "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch | |
280 | "add", | |
281 | "MONTH=3", // month + 3 | |
282 | "EXTENDED_YEAR=4638,MONTH=5,DATE=29,IS_LEAP_MONTH=0", // ch | |
283 | }, | |
284 | ||
285 | // chinese roll tests | |
286 | { // normal | |
287 | "en_US@calendar=chinese", | |
288 | "EXTENDED_YEAR=4642,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch | |
289 | "roll", | |
290 | "MONTH=3", // month + 3 | |
291 | "EXTENDED_YEAR=4642,MONTH=5,DATE=15,IS_LEAP_MONTH=0", // ch | |
292 | }, | |
293 | { // normal | |
294 | "en_US@calendar=chinese", | |
295 | "EXTENDED_YEAR=4642,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch | |
296 | "roll", | |
297 | "MONTH=11", // month + 11 | |
298 | "EXTENDED_YEAR=4642,MONTH=1,DATE=15,IS_LEAP_MONTH=0", // ch | |
299 | }, | |
300 | { // across year | |
301 | "en_US@calendar=chinese", | |
302 | "EXTENDED_YEAR=4639,MONTH=11,DATE=15,IS_LEAP_MONTH=0", // ch | |
303 | "roll", | |
304 | "MONTH=1", // month + 1 | |
305 | "EXTENDED_YEAR=4639,MONTH=0,DATE=15,IS_LEAP_MONTH=0", // ch | |
306 | }, | |
307 | { // across year | |
308 | "en_US@calendar=chinese", | |
309 | "EXTENDED_YEAR=4640,MONTH=0,DATE=15,IS_LEAP_MONTH=0", // ch | |
310 | "roll", | |
311 | "MONTH=-1", // month - 1 | |
312 | "EXTENDED_YEAR=4640,MONTH=11,DATE=15,IS_LEAP_MONTH=0", // ch | |
313 | }, | |
314 | { // month=3 is a leap month | |
315 | "en_US@calendar=chinese", | |
316 | "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch | |
317 | "roll", | |
318 | "MONTH=3", // month + 3 | |
319 | "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch | |
320 | }, | |
321 | { // month=3 is a leap month | |
322 | "en_US@calendar=chinese", | |
323 | "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch | |
324 | "roll", | |
51004dcb | 325 | "MONTH=16", // month + 16 |
46f4442e A |
326 | "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch |
327 | }, | |
328 | { // month=3 is a leap month | |
329 | "en_US@calendar=chinese", | |
330 | "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch | |
331 | "roll", | |
332 | "MONTH=2", // month + 2 | |
333 | "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch | |
334 | }, | |
335 | { // month=3 is a leap month | |
336 | "en_US@calendar=chinese", | |
337 | "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch | |
338 | "roll", | |
339 | "MONTH=28", // month + 28 | |
340 | "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch | |
341 | }, | |
342 | { // month=3 is a leap month | |
343 | "en_US@calendar=chinese", | |
344 | "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=0", // ch | |
345 | "roll", | |
346 | "MONTH=1", // month + 1 | |
347 | "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch | |
348 | }, | |
349 | { // month=3 is a leap month | |
350 | "en_US@calendar=chinese", | |
351 | "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=0", // ch | |
352 | "roll", | |
353 | "MONTH=-12", // month - 12 | |
354 | "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch | |
355 | }, | |
356 | { // month=3 is a leap month | |
357 | "en_US@calendar=chinese", | |
358 | "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch | |
359 | "roll", | |
360 | "MONTH=1", // month + 1 | |
361 | "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch | |
362 | }, | |
363 | { // month=3 is a leap month | |
364 | "en_US@calendar=chinese", | |
365 | "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch | |
366 | "roll", | |
367 | "MONTH=-25", // month - 25 | |
368 | "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch | |
369 | }, | |
370 | { // dom should pin | |
371 | "en_US@calendar=chinese", | |
372 | "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch | |
373 | "roll", | |
374 | "MONTH=1", // month + 1 | |
375 | "EXTENDED_YEAR=4638,MONTH=3,DATE=29,IS_LEAP_MONTH=1", // ch | |
376 | }, | |
377 | { // dom should pin | |
378 | "en_US@calendar=chinese", | |
379 | "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch | |
380 | "roll", | |
381 | "MONTH=14", // month + 14 | |
382 | "EXTENDED_YEAR=4638,MONTH=3,DATE=29,IS_LEAP_MONTH=1", // ch | |
383 | }, | |
384 | { // no dom pin | |
385 | "en_US@calendar=chinese", | |
386 | "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch | |
387 | "roll", | |
388 | "MONTH=15", // month + 15 | |
389 | "EXTENDED_YEAR=4638,MONTH=4,DATE=30,IS_LEAP_MONTH=0", // ch | |
390 | }, | |
391 | { // dom should pin | |
392 | "en_US@calendar=chinese", | |
393 | "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch | |
394 | "roll", | |
395 | "MONTH=-10", // month - 10 | |
396 | "EXTENDED_YEAR=4638,MONTH=5,DATE=29,IS_LEAP_MONTH=0", // ch | |
397 | }, | |
51004dcb A |
398 | //dangi add tests |
399 | { // normal | |
400 | "en_US@calendar=dangi", | |
401 | "EXTENDED_YEAR=4338,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // dangi | |
402 | "add", | |
403 | "MONTH=3", // month + 3 | |
404 | "EXTENDED_YEAR=4338,MONTH=5,DATE=15,IS_LEAP_MONTH=0", // dangi | |
405 | }, | |
406 | { // across year | |
407 | "en_US@calendar=dangi", | |
408 | "EXTENDED_YEAR=4335,MONTH=11,DATE=15,IS_LEAP_MONTH=0", // dangi | |
409 | "add", | |
410 | "MONTH=1", // month + 1 | |
411 | "EXTENDED_YEAR=4336,MONTH=0,DATE=15,IS_LEAP_MONTH=0", // dangi | |
412 | }, | |
413 | { // 4 = leap | |
414 | "en_US@calendar=dangi", | |
415 | "EXTENDED_YEAR=4334,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // dangi | |
416 | "add", | |
417 | "MONTH=3", // month + 3 | |
418 | "EXTENDED_YEAR=4334,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // dangi | |
419 | }, | |
420 | { // 4 = leap | |
421 | "en_US@calendar=dangi", | |
422 | "EXTENDED_YEAR=4334,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // dangi | |
423 | "add", | |
424 | "MONTH=2", // month + 2 | |
425 | "EXTENDED_YEAR=4334,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // dangi | |
426 | }, | |
427 | { // dom should pin | |
428 | "en_US@calendar=dangi", | |
429 | "EXTENDED_YEAR=4334,MONTH=2,DATE=30,IS_LEAP_MONTH=0", // dangi | |
430 | "add", | |
431 | "MONTH=2", // month + 2 | |
432 | "EXTENDED_YEAR=4334,MONTH=3,DATE=29,IS_LEAP_MONTH=1", // dangi | |
433 | }, | |
729e4ab9 A |
434 | { |
435 | "en_US@calendar=hebrew", | |
436 | "MILLIS=-180799750799999", | |
437 | "add", | |
438 | "YEAR=100000", // year + 100000 | |
439 | "MILLIS=2974930006022001", | |
440 | }, | |
441 | } | |
46f4442e A |
442 | } |
443 | } | |
444 | } |