]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/testdata/calendar.txt
ICU-400.37.tar.gz
[apple/icu.git] / icuSources / test / testdata / calendar.txt
CommitLineData
46f4442e
A
1// Copyright (c) 2008 International Business Machines
2// Corporation and others. All Rights Reserved.
3calendar: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 },
118 }
119 }
120 TestCalendarOperations {
121 Headers { "locale","from","operation","params","to" }
122 Info {
123 Description { "Test data for calendar operation :" }
124 }
125 Settings {
126 {
127 Type { "ops" }
128 },
129 }
130 Cases {
131 //roc
132 {
133 "en_US@calendar=roc",
134 "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw
135 "roll",
136 "DATE=1", // date + 1
137 "ERA=1,YEAR=1,MONTH=JUNE,DATE=5", // tw
138 },
139 {
140 "en_US@calendar=roc",
141 "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw
142 "add",
143 "DATE=1", // date + 1
144 "ERA=1,YEAR=1,MONTH=JUNE,DATE=5", // tw
145 },
146 {
147 "en_US@calendar=roc",
148 "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw
149 "roll",
150 "YEAR=1", // date + 1
151 "ERA=1,YEAR=2,MONTH=JUNE,DATE=4", // tw
152 },
153 {
154 "en_US@calendar=roc",
155 "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw
156 "add",
157 "YEAR=1", // date + 1
158 "ERA=1,YEAR=2,MONTH=JUNE,DATE=4", // tw
159 },
160
161 //chinese add tests
162 { // normal
163 "en_US@calendar=chinese",
164 "EXTENDED_YEAR=4642,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch
165 "add",
166 "MONTH=3", // month + 3
167 "EXTENDED_YEAR=4642,MONTH=5,DATE=15,IS_LEAP_MONTH=0", // ch
168 },
169 { // across year
170 "en_US@calendar=chinese",
171 "EXTENDED_YEAR=4639,MONTH=11,DATE=15,IS_LEAP_MONTH=0", // ch
172 "add",
173 "MONTH=1", // month + 1
174 "EXTENDED_YEAR=4640,MONTH=0,DATE=15,IS_LEAP_MONTH=0", // ch
175 },
176 { // across year
177 "en_US@calendar=chinese",
178 "EXTENDED_YEAR=4640,MONTH=0,DATE=15,IS_LEAP_MONTH=0", // ch
179 "add",
180 "MONTH=-1", // month - 1
181 "EXTENDED_YEAR=4639,MONTH=11,DATE=15,IS_LEAP_MONTH=0", // ch
182 },
183 { // month=3 is a leap month
184 "en_US@calendar=chinese",
185 "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch
186 "add",
187 "MONTH=3", // month + 3
188 "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch
189 },
190 { // month=3 is a leap month
191 "en_US@calendar=chinese",
192 "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch
193 "add",
194 "MONTH=2", // month + 2
195 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch
196 },
197 { // month=3 is a leap month
198 "en_US@calendar=chinese",
199 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=0", // ch
200 "add",
201 "MONTH=1", // month + 1
202 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch
203 },
204 { // month=3 is a leap month
205 "en_US@calendar=chinese",
206 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch
207 "add",
208 "MONTH=1", // month + 1
209 "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch
210 },
211 { // dom should pin
212 "en_US@calendar=chinese",
213 "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch
214 "add",
215 "MONTH=1", // month + 1
216 "EXTENDED_YEAR=4638,MONTH=3,DATE=29,IS_LEAP_MONTH=1", // ch
217 },
218 { // dom should pin
219 "en_US@calendar=chinese",
220 "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch
221 "add",
222 "MONTH=2", // month + 2
223 "EXTENDED_YEAR=4638,MONTH=4,DATE=30,IS_LEAP_MONTH=0", // ch
224 },
225 { // dom should pin
226 "en_US@calendar=chinese",
227 "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch
228 "add",
229 "MONTH=3", // month + 3
230 "EXTENDED_YEAR=4638,MONTH=5,DATE=29,IS_LEAP_MONTH=0", // ch
231 },
232
233 // chinese roll tests
234 { // normal
235 "en_US@calendar=chinese",
236 "EXTENDED_YEAR=4642,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch
237 "roll",
238 "MONTH=3", // month + 3
239 "EXTENDED_YEAR=4642,MONTH=5,DATE=15,IS_LEAP_MONTH=0", // ch
240 },
241 { // normal
242 "en_US@calendar=chinese",
243 "EXTENDED_YEAR=4642,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch
244 "roll",
245 "MONTH=11", // month + 11
246 "EXTENDED_YEAR=4642,MONTH=1,DATE=15,IS_LEAP_MONTH=0", // ch
247 },
248 { // across year
249 "en_US@calendar=chinese",
250 "EXTENDED_YEAR=4639,MONTH=11,DATE=15,IS_LEAP_MONTH=0", // ch
251 "roll",
252 "MONTH=1", // month + 1
253 "EXTENDED_YEAR=4639,MONTH=0,DATE=15,IS_LEAP_MONTH=0", // ch
254 },
255 { // across year
256 "en_US@calendar=chinese",
257 "EXTENDED_YEAR=4640,MONTH=0,DATE=15,IS_LEAP_MONTH=0", // ch
258 "roll",
259 "MONTH=-1", // month - 1
260 "EXTENDED_YEAR=4640,MONTH=11,DATE=15,IS_LEAP_MONTH=0", // ch
261 },
262 { // month=3 is a leap month
263 "en_US@calendar=chinese",
264 "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch
265 "roll",
266 "MONTH=3", // month + 3
267 "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch
268 },
269 { // month=3 is a leap month
270 "en_US@calendar=chinese",
271 "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch
272 "roll",
273 "MONTH=3", // month + 16
274 "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch
275 },
276 { // month=3 is a leap month
277 "en_US@calendar=chinese",
278 "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch
279 "roll",
280 "MONTH=2", // month + 2
281 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch
282 },
283 { // month=3 is a leap month
284 "en_US@calendar=chinese",
285 "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch
286 "roll",
287 "MONTH=28", // month + 28
288 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch
289 },
290 { // month=3 is a leap month
291 "en_US@calendar=chinese",
292 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=0", // ch
293 "roll",
294 "MONTH=1", // month + 1
295 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch
296 },
297 { // month=3 is a leap month
298 "en_US@calendar=chinese",
299 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=0", // ch
300 "roll",
301 "MONTH=-12", // month - 12
302 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch
303 },
304 { // month=3 is a leap month
305 "en_US@calendar=chinese",
306 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch
307 "roll",
308 "MONTH=1", // month + 1
309 "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch
310 },
311 { // month=3 is a leap month
312 "en_US@calendar=chinese",
313 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch
314 "roll",
315 "MONTH=-25", // month - 25
316 "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch
317 },
318 { // dom should pin
319 "en_US@calendar=chinese",
320 "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch
321 "roll",
322 "MONTH=1", // month + 1
323 "EXTENDED_YEAR=4638,MONTH=3,DATE=29,IS_LEAP_MONTH=1", // ch
324 },
325 { // dom should pin
326 "en_US@calendar=chinese",
327 "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch
328 "roll",
329 "MONTH=14", // month + 14
330 "EXTENDED_YEAR=4638,MONTH=3,DATE=29,IS_LEAP_MONTH=1", // ch
331 },
332 { // no dom pin
333 "en_US@calendar=chinese",
334 "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch
335 "roll",
336 "MONTH=15", // month + 15
337 "EXTENDED_YEAR=4638,MONTH=4,DATE=30,IS_LEAP_MONTH=0", // ch
338 },
339 { // dom should pin
340 "en_US@calendar=chinese",
341 "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch
342 "roll",
343 "MONTH=-10", // month - 10
344 "EXTENDED_YEAR=4638,MONTH=5,DATE=29,IS_LEAP_MONTH=0", // ch
345 },
346
347 }
348 }
349 }
350}