]>
Commit | Line | Data |
---|---|---|
f3c0d7a5 A |
1 | // © 2016 and later: Unicode, Inc. and others. |
2 | // License & terms of use: http://www.unicode.org/copyright.html | |
46f4442e | 3 | /******************************************************************** |
f3c0d7a5 | 4 | * COPYRIGHT: |
2ca993e8 | 5 | * Copyright (c) 1997-2016, International Business Machines Corporation and |
46f4442e A |
6 | * others. All Rights Reserved. |
7 | ********************************************************************/ | |
8 | ||
9 | #include "unicode/utypes.h" | |
10 | ||
11 | #if !UCONFIG_NO_FORMATTING | |
12 | ||
13 | ||
14 | //TODO: define it in compiler flag | |
15 | //#define DTIFMTTS_DEBUG 1 | |
16 | ||
17 | ||
f3c0d7a5 | 18 | #ifdef DTIFMTTS_DEBUG |
729e4ab9 | 19 | #include <iostream> |
46f4442e A |
20 | #endif |
21 | ||
2ca993e8 | 22 | #include "dtifmtts.h" |
46f4442e | 23 | |
2ca993e8 A |
24 | #include "cmemory.h" |
25 | #include "cstr.h" | |
46f4442e | 26 | #include "cstring.h" |
2ca993e8 | 27 | #include "simplethread.h" |
1546d4af | 28 | #include "japancal.h" |
46f4442e A |
29 | #include "unicode/gregocal.h" |
30 | #include "unicode/dtintrv.h" | |
31 | #include "unicode/dtitvinf.h" | |
32 | #include "unicode/dtitvfmt.h" | |
51004dcb | 33 | #include "unicode/localpointer.h" |
4388f060 | 34 | #include "unicode/timezone.h" |
46f4442e A |
35 | |
36 | ||
37 | ||
f3c0d7a5 | 38 | #ifdef DTIFMTTS_DEBUG |
46f4442e A |
39 | //#define PRINTMESG(msg) { std::cout << "(" << __FILE__ << ":" << __LINE__ << ") " << msg << "\n"; } |
40 | #define PRINTMESG(msg) { std::cout << msg; } | |
41 | #endif | |
42 | ||
46f4442e A |
43 | #include <stdio.h> |
44 | ||
45 | ||
46 | void DateIntervalFormatTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { | |
47 | if (exec) logln("TestSuite DateIntervalFormat"); | |
48 | switch (index) { | |
49 | TESTCASE(0, testAPI); | |
50 | TESTCASE(1, testFormat); | |
51 | TESTCASE(2, testFormatUserDII); | |
51004dcb | 52 | TESTCASE(3, testSetIntervalPatternNoSideEffect); |
57a6839d A |
53 | TESTCASE(4, testYearFormats); |
54 | TESTCASE(5, testStress); | |
b331163b | 55 | TESTCASE(6, testTicket11583_2); |
2ca993e8 A |
56 | TESTCASE(7, testTicket11985); |
57 | TESTCASE(8, testTicket11669); | |
f3c0d7a5 | 58 | TESTCASE(9, testTicket12065); |
3d1f044b | 59 | TESTCASE(10, testFormattedDateInterval); |
46f4442e A |
60 | default: name = ""; break; |
61 | } | |
62 | } | |
63 | ||
64 | /** | |
65 | * Test various generic API methods of DateIntervalFormat for API coverage. | |
66 | */ | |
67 | void DateIntervalFormatTest::testAPI() { | |
68 | ||
69 | /* ====== Test create interval instance with default locale and skeleton | |
70 | */ | |
71 | UErrorCode status = U_ZERO_ERROR; | |
72 | logln("Testing DateIntervalFormat create instance with default locale and skeleton"); | |
f3c0d7a5 | 73 | |
46f4442e A |
74 | DateIntervalFormat* dtitvfmt = DateIntervalFormat::createInstance(UDAT_YEAR_MONTH_DAY, status); |
75 | if(U_FAILURE(status)) { | |
76 | dataerrln("ERROR: Could not create DateIntervalFormat (skeleton + default locale) - exitting"); | |
77 | return; | |
78 | } else { | |
79 | delete dtitvfmt; | |
80 | } | |
81 | ||
82 | ||
83 | /* ====== Test create interval instance with given locale and skeleton | |
84 | */ | |
85 | status = U_ZERO_ERROR; | |
86 | logln("Testing DateIntervalFormat create instance with given locale and skeleton"); | |
f3c0d7a5 | 87 | |
46f4442e A |
88 | dtitvfmt = DateIntervalFormat::createInstance(UDAT_YEAR_MONTH_DAY, Locale::getJapanese(), status); |
89 | if(U_FAILURE(status)) { | |
90 | dataerrln("ERROR: Could not create DateIntervalFormat (skeleton + locale) - exitting"); | |
91 | return; | |
92 | } else { | |
93 | delete dtitvfmt; | |
94 | } | |
95 | ||
96 | ||
97 | /* ====== Test create interval instance with dateIntervalInfo and skeleton | |
98 | */ | |
99 | status = U_ZERO_ERROR; | |
100 | logln("Testing DateIntervalFormat create instance with dateIntervalInfo and skeleton"); | |
f3c0d7a5 | 101 | |
46f4442e A |
102 | DateIntervalInfo* dtitvinf = new DateIntervalInfo(Locale::getSimplifiedChinese(), status); |
103 | ||
104 | dtitvfmt = DateIntervalFormat::createInstance("EEEdMMMyhms", *dtitvinf, status); | |
105 | delete dtitvinf; | |
106 | ||
107 | if(U_FAILURE(status)) { | |
108 | dataerrln("ERROR: Could not create DateIntervalFormat (skeleton + DateIntervalInfo + default locale) - exitting"); | |
109 | return; | |
110 | } else { | |
111 | delete dtitvfmt; | |
f3c0d7a5 | 112 | } |
46f4442e A |
113 | |
114 | ||
115 | /* ====== Test create interval instance with dateIntervalInfo and skeleton | |
116 | */ | |
117 | status = U_ZERO_ERROR; | |
118 | logln("Testing DateIntervalFormat create instance with dateIntervalInfo and skeleton"); | |
f3c0d7a5 | 119 | |
46f4442e A |
120 | dtitvinf = new DateIntervalInfo(Locale::getSimplifiedChinese(), status); |
121 | ||
122 | dtitvfmt = DateIntervalFormat::createInstance("EEEdMMMyhms", Locale::getSimplifiedChinese(), *dtitvinf, status); | |
123 | delete dtitvinf; | |
124 | if(U_FAILURE(status)) { | |
125 | dataerrln("ERROR: Could not create DateIntervalFormat (skeleton + DateIntervalInfo + locale) - exitting"); | |
126 | return; | |
f3c0d7a5 A |
127 | } |
128 | // not deleted, test clone | |
46f4442e A |
129 | |
130 | ||
131 | // ====== Test clone() | |
132 | status = U_ZERO_ERROR; | |
133 | logln("Testing DateIntervalFormat clone"); | |
134 | ||
135 | DateIntervalFormat* another = (DateIntervalFormat*)dtitvfmt->clone(); | |
136 | if ( (*another) != (*dtitvfmt) ) { | |
2ca993e8 | 137 | dataerrln("%s:%d ERROR: clone failed", __FILE__, __LINE__); |
46f4442e A |
138 | } |
139 | ||
729e4ab9 | 140 | |
46f4442e A |
141 | // ====== Test getDateIntervalInfo, setDateIntervalInfo, adoptDateIntervalInfo |
142 | status = U_ZERO_ERROR; | |
143 | logln("Testing DateIntervalFormat getDateIntervalInfo"); | |
144 | const DateIntervalInfo* inf = another->getDateIntervalInfo(); | |
145 | dtitvfmt->setDateIntervalInfo(*inf, status); | |
146 | const DateIntervalInfo* anotherInf = dtitvfmt->getDateIntervalInfo(); | |
147 | if ( (*inf) != (*anotherInf) || U_FAILURE(status) ) { | |
148 | dataerrln("ERROR: getDateIntervalInfo/setDateIntervalInfo failed"); | |
149 | } | |
150 | ||
51004dcb A |
151 | { |
152 | // We make sure that setDateIntervalInfo does not corrupt the cache. See ticket 9919. | |
153 | status = U_ZERO_ERROR; | |
154 | logln("Testing DateIntervalFormat setDateIntervalInfo"); | |
155 | const Locale &enLocale = Locale::getEnglish(); | |
156 | LocalPointer<DateIntervalFormat> dif(DateIntervalFormat::createInstance("yMd", enLocale, status)); | |
157 | if (U_FAILURE(status)) { | |
158 | errln("Failure encountered: %s", u_errorName(status)); | |
159 | return; | |
160 | } | |
161 | UnicodeString expected; | |
162 | LocalPointer<Calendar> fromTime(Calendar::createInstance(enLocale, status)); | |
163 | LocalPointer<Calendar> toTime(Calendar::createInstance(enLocale, status)); | |
164 | if (U_FAILURE(status)) { | |
165 | errln("Failure encountered: %s", u_errorName(status)); | |
166 | return; | |
167 | } | |
f3c0d7a5 | 168 | FieldPosition pos(FieldPosition::DONT_CARE); |
51004dcb A |
169 | fromTime->set(2013, 3, 26); |
170 | toTime->set(2013, 3, 28); | |
171 | dif->format(*fromTime, *toTime, expected, pos, status); | |
172 | if (U_FAILURE(status)) { | |
173 | errln("Failure encountered: %s", u_errorName(status)); | |
174 | return; | |
175 | } | |
b331163b | 176 | LocalPointer<DateIntervalInfo> dii(new DateIntervalInfo(Locale::getEnglish(), status), status); |
51004dcb A |
177 | if (U_FAILURE(status)) { |
178 | errln("Failure encountered: %s", u_errorName(status)); | |
179 | return; | |
180 | } | |
181 | dii->setIntervalPattern(ctou("yMd"), UCAL_DATE, ctou("M/d/y \\u2013 d"), status); | |
182 | dif->setDateIntervalInfo(*dii, status); | |
183 | if (U_FAILURE(status)) { | |
184 | errln("Failure encountered: %s", u_errorName(status)); | |
185 | return; | |
186 | } | |
187 | dif.adoptInstead(DateIntervalFormat::createInstance("yMd", enLocale, status)); | |
188 | if (U_FAILURE(status)) { | |
189 | errln("Failure encountered: %s", u_errorName(status)); | |
190 | return; | |
191 | } | |
192 | UnicodeString actual; | |
193 | pos = 0; | |
194 | dif->format(*fromTime, *toTime, actual, pos, status); | |
195 | if (U_FAILURE(status)) { | |
196 | errln("Failure encountered: %s", u_errorName(status)); | |
197 | return; | |
198 | } | |
199 | if (expected != actual) { | |
200 | errln("DateIntervalFormat.setIntervalInfo should have no side effects."); | |
201 | } | |
202 | } | |
f3c0d7a5 | 203 | |
46f4442e A |
204 | /* |
205 | status = U_ZERO_ERROR; | |
206 | DateIntervalInfo* nonConstInf = inf->clone(); | |
207 | dtitvfmt->adoptDateIntervalInfo(nonConstInf, status); | |
208 | anotherInf = dtitvfmt->getDateIntervalInfo(); | |
209 | if ( (*inf) != (*anotherInf) || U_FAILURE(status) ) { | |
210 | dataerrln("ERROR: adoptDateIntervalInfo failed"); | |
211 | } | |
212 | */ | |
213 | ||
214 | // ====== Test getDateFormat, setDateFormat, adoptDateFormat | |
f3c0d7a5 | 215 | |
46f4442e A |
216 | status = U_ZERO_ERROR; |
217 | logln("Testing DateIntervalFormat getDateFormat"); | |
46f4442e | 218 | /* |
729e4ab9 | 219 | const DateFormat* fmt = another->getDateFormat(); |
46f4442e A |
220 | dtitvfmt->setDateFormat(*fmt, status); |
221 | const DateFormat* anotherFmt = dtitvfmt->getDateFormat(); | |
222 | if ( (*fmt) != (*anotherFmt) || U_FAILURE(status) ) { | |
223 | dataerrln("ERROR: getDateFormat/setDateFormat failed"); | |
224 | } | |
225 | ||
226 | status = U_ZERO_ERROR; | |
227 | DateFormat* nonConstFmt = (DateFormat*)fmt->clone(); | |
228 | dtitvfmt->adoptDateFormat(nonConstFmt, status); | |
229 | anotherFmt = dtitvfmt->getDateFormat(); | |
230 | if ( (*fmt) != (*anotherFmt) || U_FAILURE(status) ) { | |
231 | dataerrln("ERROR: adoptDateFormat failed"); | |
232 | } | |
729e4ab9 | 233 | delete fmt; |
46f4442e A |
234 | */ |
235 | ||
236 | ||
237 | // ======= Test getStaticClassID() | |
238 | ||
239 | logln("Testing getStaticClassID()"); | |
240 | ||
241 | ||
242 | if(dtitvfmt->getDynamicClassID() != DateIntervalFormat::getStaticClassID()) { | |
243 | errln("ERROR: getDynamicClassID() didn't return the expected value"); | |
244 | } | |
f3c0d7a5 | 245 | |
46f4442e A |
246 | delete another; |
247 | ||
248 | // ====== test constructor/copy constructor and assignment | |
249 | /* they are protected, no test | |
250 | logln("Testing DateIntervalFormat constructor and assigment operator"); | |
251 | status = U_ZERO_ERROR; | |
252 | ||
253 | DateFormat* constFmt = (constFmt*)dtitvfmt->getDateFormat()->clone(); | |
254 | inf = dtitvfmt->getDateIntervalInfo()->clone(); | |
255 | ||
256 | ||
257 | DateIntervalFormat* dtifmt = new DateIntervalFormat(fmt, inf, status); | |
258 | if(U_FAILURE(status)) { | |
259 | dataerrln("ERROR: Could not create DateIntervalFormat (default) - exitting"); | |
260 | return; | |
f3c0d7a5 | 261 | } |
46f4442e A |
262 | |
263 | DateIntervalFormat* dtifmt2 = new(dtifmt); | |
264 | if ( (*dtifmt) != (*dtifmt2) ) { | |
265 | dataerrln("ERROR: Could not create DateIntervalFormat (default) - exitting"); | |
266 | return; | |
267 | } | |
268 | ||
269 | DateIntervalFormat dtifmt3 = (*dtifmt); | |
270 | if ( (*dtifmt) != dtifmt3 ) { | |
271 | dataerrln("ERROR: Could not create DateIntervalFormat (default) - exitting"); | |
272 | return; | |
273 | } | |
274 | ||
275 | delete dtifmt2; | |
276 | delete dtifmt3; | |
277 | delete dtifmt; | |
278 | */ | |
279 | ||
280 | ||
281 | //===== test format and parse ================== | |
282 | Formattable formattable; | |
283 | formattable.setInt64(10); | |
284 | UnicodeString res; | |
f3c0d7a5 | 285 | FieldPosition pos(FieldPosition::DONT_CARE); |
46f4442e A |
286 | status = U_ZERO_ERROR; |
287 | dtitvfmt->format(formattable, res, pos, status); | |
288 | if ( status != U_ILLEGAL_ARGUMENT_ERROR ) { | |
289 | dataerrln("ERROR: format non-date-interval object should set U_ILLEGAL_ARGUMENT_ERROR - exitting"); | |
290 | return; | |
291 | } | |
292 | ||
293 | DateInterval* dtitv = new DateInterval(3600*24*365, 3600*24*366); | |
294 | formattable.adoptObject(dtitv); | |
295 | res.remove(); | |
296 | pos = 0; | |
297 | status = U_ZERO_ERROR; | |
298 | dtitvfmt->format(formattable, res, pos, status); | |
299 | if ( U_FAILURE(status) ) { | |
300 | dataerrln("ERROR: format date interval failed - exitting"); | |
301 | return; | |
302 | } | |
303 | ||
304 | const DateFormat* dfmt = dtitvfmt->getDateFormat(); | |
305 | Calendar* fromCal = dfmt->getCalendar()->clone(); | |
306 | Calendar* toCal = dfmt->getCalendar()->clone(); | |
307 | res.remove(); | |
308 | pos = 0; | |
309 | status = U_ZERO_ERROR; | |
310 | dtitvfmt->format(*fromCal, *toCal, res, pos, status); | |
311 | if ( U_FAILURE(status) ) { | |
312 | dataerrln("ERROR: format date interval failed - exitting"); | |
313 | return; | |
314 | } | |
315 | delete fromCal; | |
316 | delete toCal; | |
317 | ||
318 | ||
319 | Formattable fmttable; | |
320 | status = U_ZERO_ERROR; | |
321 | // TODO: why do I need cast? | |
322 | ((Format*)dtitvfmt)->parseObject(res, fmttable, status); | |
323 | if ( status != U_INVALID_FORMAT_ERROR ) { | |
324 | dataerrln("ERROR: parse should set U_INVALID_FORMAT_ERROR - exitting"); | |
325 | return; | |
326 | } | |
327 | ||
328 | delete dtitvfmt; | |
329 | ||
4388f060 A |
330 | //====== test setting time zone |
331 | logln("Testing DateIntervalFormat set & format with different time zones, get time zone"); | |
332 | status = U_ZERO_ERROR; | |
333 | dtitvfmt = DateIntervalFormat::createInstance("MMMdHHmm", Locale::getEnglish(), status); | |
334 | if ( U_SUCCESS(status) ) { | |
335 | UDate date1 = 1299090600000.0; // 2011-Mar-02 1030 in US/Pacific, 2011-Mar-03 0330 in Asia/Tokyo | |
336 | UDate date2 = 1299115800000.0; // 2011-Mar-02 1730 in US/Pacific, 2011-Mar-03 1030 in Asia/Tokyo | |
f3c0d7a5 | 337 | |
4388f060 A |
338 | DateInterval * dtitv12 = new DateInterval(date1, date2); |
339 | TimeZone * tzCalif = TimeZone::createTimeZone("US/Pacific"); | |
340 | TimeZone * tzTokyo = TimeZone::createTimeZone("Asia/Tokyo"); | |
f3c0d7a5 A |
341 | UnicodeString fmtCalif = UnicodeString(ctou("Mar 2, 10:30\\u2009\\u2013\\u200917:30")); |
342 | UnicodeString fmtTokyo = UnicodeString(ctou("Mar 3, 03:30\\u2009\\u2013\\u200910:30")); | |
4388f060 A |
343 | |
344 | dtitvfmt->adoptTimeZone(tzCalif); | |
345 | res.remove(); | |
346 | pos = 0; | |
347 | status = U_ZERO_ERROR; | |
348 | dtitvfmt->format(dtitv12, res, pos, status); | |
349 | if ( U_SUCCESS(status) ) { | |
350 | if ( res.compare(fmtCalif) != 0 ) { | |
351 | errln("ERROR: DateIntervalFormat::format for tzCalif, expect " + fmtCalif + ", get " + res); | |
352 | } | |
353 | } else { | |
354 | errln("ERROR: DateIntervalFormat::format for tzCalif, status %s", u_errorName(status)); | |
355 | } | |
356 | ||
357 | dtitvfmt->setTimeZone(*tzTokyo); | |
358 | res.remove(); | |
359 | pos = 0; | |
360 | status = U_ZERO_ERROR; | |
361 | dtitvfmt->format(dtitv12, res, pos, status); | |
362 | if ( U_SUCCESS(status) ) { | |
363 | if ( res.compare(fmtTokyo) != 0 ) { | |
f3c0d7a5 | 364 | errln("ERROR: DateIntervalFormat::format for tzTokyo, expect " + fmtTokyo + ", get " + res); |
4388f060 A |
365 | } |
366 | } else { | |
367 | errln("ERROR: DateIntervalFormat::format for tzTokyo, status %s", u_errorName(status)); | |
368 | } | |
f3c0d7a5 | 369 | |
4388f060 A |
370 | if ( dtitvfmt->getTimeZone() != *tzTokyo ) { |
371 | errln("ERROR: DateIntervalFormat::getTimeZone returns mismatch."); | |
372 | } | |
373 | ||
374 | delete tzTokyo; // tzCalif was owned by dtitvfmt which should have deleted it | |
375 | delete dtitv12; | |
376 | delete dtitvfmt; | |
377 | } else { | |
378 | errln("ERROR: DateIntervalFormat::createInstance(\"MdHH\", Locale::getEnglish(), ...), status %s", u_errorName(status)); | |
379 | } | |
46f4442e | 380 | //====== test format in testFormat() |
f3c0d7a5 | 381 | |
729e4ab9 A |
382 | //====== test DateInterval class (better coverage) |
383 | DateInterval dtitv1(3600*24*365, 3600*24*366); | |
384 | DateInterval dtitv2(dtitv1); | |
385 | ||
386 | if (!(dtitv1 == dtitv2)) { | |
387 | errln("ERROR: Copy constructor failed for DateInterval."); | |
388 | } | |
389 | ||
390 | DateInterval dtitv3(3600*365, 3600*366); | |
391 | dtitv3 = dtitv1; | |
392 | if (!(dtitv3 == dtitv1)) { | |
393 | errln("ERROR: Equal operator failed for DateInterval."); | |
394 | } | |
395 | ||
396 | DateInterval *dtitv4 = dtitv1.clone(); | |
397 | if (*dtitv4 != dtitv1) { | |
398 | errln("ERROR: Equal operator failed for DateInterval."); | |
399 | } | |
400 | delete dtitv4; | |
46f4442e A |
401 | } |
402 | ||
403 | ||
404 | /** | |
405 | * Test format | |
406 | */ | |
407 | void DateIntervalFormatTest::testFormat() { | |
408 | // first item is date pattern | |
409 | // followed by a group of locale/from_data/to_data/skeleton/interval_data | |
1546d4af | 410 | // Note that from_data/to_data are specified using era names from root, for the calendar specified by locale. |
46f4442e | 411 | const char* DATA[] = { |
1546d4af | 412 | "GGGGG y MM dd HH:mm:ss", // pattern for from_data/to_data |
729e4ab9 | 413 | // test root |
1546d4af | 414 | "root", "CE 2007 11 10 10:10:10", "CE 2007 12 10 10:10:10", "yM", "2007-11 \\u2013 2007-12", |
f3c0d7a5 | 415 | |
729e4ab9 | 416 | // test 'H' and 'h', using availableFormat in fallback |
1546d4af A |
417 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 10 15:10:10", "Hms", "10:10:10\\u2009\\u2013\\u200915:10:10", |
418 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 10 15:10:10", "hms", "10:10:10 AM\\u2009\\u2013\\u20093:10:10 PM", | |
729e4ab9 | 419 | |
1546d4af A |
420 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "MMMM", "October 2007\\u2009\\u2013\\u2009October 2008", |
421 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "MMM", "Oct 2007\\u2009\\u2013\\u2009Oct 2008", | |
46f4442e | 422 | // test skeleton with both date and time |
1546d4af | 423 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "dMMMyhm", "Nov 10, 2007, 10:10 AM\\u2009\\u2013\\u2009Nov 20, 2007, 10:10 AM", |
0f5d89e8 | 424 | |
1546d4af | 425 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 10 11:10:10", "dMMMyhm", "Nov 10, 2007, 10:10\\u2009\\u2013\\u200911:10 AM", |
0f5d89e8 | 426 | |
1546d4af A |
427 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 10 11:10:10", "hms", "10:10:10 AM\\u2009\\u2013\\u200911:10:10 AM", |
428 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 10 11:10:10", "Hms", "10:10:10\\u2009\\u2013\\u200911:10:10", | |
429 | "en", "CE 2007 11 10 20:10:10", "CE 2007 11 10 21:10:10", "Hms", "20:10:10\\u2009\\u2013\\u200921:10:10", | |
0f5d89e8 | 430 | |
1546d4af | 431 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "EEEEdMMMMy", "Wednesday, October 10, 2007\\u2009\\u2013\\u2009Friday, October 10, 2008", |
0f5d89e8 | 432 | |
1546d4af | 433 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "dMMMMy", "October 10, 2007\\u2009\\u2013\\u2009October 10, 2008", |
0f5d89e8 | 434 | |
1546d4af | 435 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "dMMMM", "October 10, 2007\\u2009\\u2013\\u2009October 10, 2008", |
0f5d89e8 | 436 | |
1546d4af | 437 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "MMMMy", "October 2007\\u2009\\u2013\\u2009October 2008", |
0f5d89e8 | 438 | |
1546d4af | 439 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "EEEEdMMMM", "Wednesday, October 10, 2007\\u2009\\u2013\\u2009Friday, October 10, 2008", |
0f5d89e8 | 440 | |
1546d4af | 441 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "EdMMMy", "Wed, Oct 10, 2007\\u2009\\u2013\\u2009Fri, Oct 10, 2008", |
0f5d89e8 | 442 | |
1546d4af | 443 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "dMMMy", "Oct 10, 2007\\u2009\\u2013\\u2009Oct 10, 2008", |
0f5d89e8 | 444 | |
1546d4af | 445 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "dMMM", "Oct 10, 2007\\u2009\\u2013\\u2009Oct 10, 2008", |
0f5d89e8 | 446 | |
1546d4af | 447 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "MMMy", "Oct 2007\\u2009\\u2013\\u2009Oct 2008", |
0f5d89e8 | 448 | |
1546d4af | 449 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "EdMMM", "Wed, Oct 10, 2007\\u2009\\u2013\\u2009Fri, Oct 10, 2008", |
0f5d89e8 | 450 | |
1546d4af | 451 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "EdMy", "Wed, 10/10/2007\\u2009\\u2013\\u2009Fri, 10/10/2008", |
0f5d89e8 | 452 | |
1546d4af | 453 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "dMy", "10/10/2007\\u2009\\u2013\\u200910/10/2008", |
0f5d89e8 | 454 | |
1546d4af | 455 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "dM", "10/10/2007\\u2009\\u2013\\u200910/10/2008", |
0f5d89e8 | 456 | |
1546d4af | 457 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "My", "10/2007\\u2009\\u2013\\u200910/2008", |
0f5d89e8 | 458 | |
1546d4af | 459 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "EdM", "Wed, 10/10/2007\\u2009\\u2013\\u2009Fri, 10/10/2008", |
0f5d89e8 | 460 | |
1546d4af | 461 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "d", "10/10/2007\\u2009\\u2013\\u200910/10/2008", |
0f5d89e8 | 462 | |
1546d4af | 463 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "Ed", "10 Wed\\u2009\\u2013\\u200910 Fri", |
0f5d89e8 | 464 | |
1546d4af | 465 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "y", "2007\\u2009\\u2013\\u20092008", |
0f5d89e8 | 466 | |
1546d4af | 467 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "M", "10/2007\\u2009\\u2013\\u200910/2008", |
0f5d89e8 A |
468 | |
469 | ||
470 | ||
1546d4af A |
471 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "hm", "10/10/2007, 10:10 AM\\u2009\\u2013\\u200910/10/2008, 10:10 AM", |
472 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "Hm", "10/10/2007, 10:10\\u2009\\u2013\\u200910/10/2008, 10:10", | |
473 | "en", "CE 2007 10 10 20:10:10", "CE 2008 10 10 20:10:10", "Hm", "10/10/2007, 20:10\\u2009\\u2013\\u200910/10/2008, 20:10", | |
0f5d89e8 | 474 | |
1546d4af | 475 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "hmv", "10/10/2007, 10:10 AM PT\\u2009\\u2013\\u200910/10/2008, 10:10 AM PT", |
0f5d89e8 | 476 | |
1546d4af | 477 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "hmz", "10/10/2007, 10:10 AM PDT\\u2009\\u2013\\u200910/10/2008, 10:10 AM PDT", |
0f5d89e8 | 478 | |
1546d4af | 479 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "h", "10/10/2007, 10 AM\\u2009\\u2013\\u200910/10/2008, 10 AM", |
0f5d89e8 | 480 | |
1546d4af | 481 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "hv", "10/10/2007, 10 AM PT\\u2009\\u2013\\u200910/10/2008, 10 AM PT", |
0f5d89e8 | 482 | |
1546d4af | 483 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "hz", "10/10/2007, 10 AM PDT\\u2009\\u2013\\u200910/10/2008, 10 AM PDT", |
0f5d89e8 | 484 | |
1546d4af | 485 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "EEddMMyyyy", "Wed, 10/10/2007\\u2009\\u2013\\u2009Fri, 10/10/2008", |
0f5d89e8 | 486 | |
1546d4af | 487 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "EddMMy", "Wed, 10/10/2007\\u2009\\u2013\\u2009Fri, 10/10/2008", |
0f5d89e8 | 488 | |
1546d4af | 489 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "hhmm", "10/10/2007, 10:10 AM\\u2009\\u2013\\u200910/10/2008, 10:10 AM", |
0f5d89e8 | 490 | |
1546d4af | 491 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "hhmmzz", "10/10/2007, 10:10 AM PDT\\u2009\\u2013\\u200910/10/2008, 10:10 AM PDT", |
0f5d89e8 | 492 | |
1546d4af | 493 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "hms", "10/10/2007, 10:10:10 AM\\u2009\\u2013\\u200910/10/2008, 10:10:10 AM", |
0f5d89e8 | 494 | |
1546d4af | 495 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "dMMMMMy", "O 10, 2007\\u2009\\u2013\\u2009O 10, 2008", |
0f5d89e8 | 496 | |
1546d4af | 497 | "en", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "EEEEEdM", "W, 10/10/2007\\u2009\\u2013\\u2009F, 10/10/2008", |
0f5d89e8 | 498 | |
1546d4af | 499 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "EEEEdMMMMy", "Wednesday, October 10\\u2009\\u2013\\u2009Saturday, November 10, 2007", |
0f5d89e8 | 500 | |
1546d4af | 501 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "dMMMMy", "October 10\\u2009\\u2013\\u2009November 10, 2007", |
0f5d89e8 | 502 | |
1546d4af | 503 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "dMMMM", "October 10\\u2009\\u2013\\u2009November 10", |
0f5d89e8 | 504 | |
1546d4af | 505 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "MMMMy", "October\\u2009\\u2013\\u2009November 2007", |
0f5d89e8 | 506 | |
1546d4af | 507 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "EEEEdMMMM", "Wednesday, October 10\\u2009\\u2013\\u2009Saturday, November 10", |
0f5d89e8 | 508 | |
1546d4af | 509 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "EdMMMy", "Wed, Oct 10\\u2009\\u2013\\u2009Sat, Nov 10, 2007", |
0f5d89e8 | 510 | |
1546d4af | 511 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "dMMMy", "Oct 10\\u2009\\u2013\\u2009Nov 10, 2007", |
0f5d89e8 | 512 | |
1546d4af | 513 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "dMMM", "Oct 10\\u2009\\u2013\\u2009Nov 10", |
0f5d89e8 | 514 | |
1546d4af | 515 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "MMMy", "Oct\\u2009\\u2013\\u2009Nov 2007", |
0f5d89e8 | 516 | |
1546d4af | 517 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "EdMMM", "Wed, Oct 10\\u2009\\u2013\\u2009Sat, Nov 10", |
0f5d89e8 | 518 | |
1546d4af | 519 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "EdMy", "Wed, 10/10/2007\\u2009\\u2013\\u2009Sat, 11/10/2007", |
0f5d89e8 | 520 | |
1546d4af | 521 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "dMy", "10/10/2007\\u2009\\u2013\\u200911/10/2007", |
0f5d89e8 A |
522 | |
523 | ||
1546d4af | 524 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "My", "10/2007\\u2009\\u2013\\u200911/2007", |
0f5d89e8 | 525 | |
1546d4af | 526 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "EdM", "Wed, 10/10\\u2009\\u2013\\u2009Sat, 11/10", |
0f5d89e8 | 527 | |
1546d4af | 528 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "d", "10/10\\u2009\\u2013\\u200911/10", |
0f5d89e8 | 529 | |
1546d4af | 530 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "Ed", "10 Wed\\u2009\\u2013\\u200910 Sat", |
0f5d89e8 | 531 | |
1546d4af | 532 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "y", "2007", |
0f5d89e8 | 533 | |
1546d4af | 534 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "M", "10\\u2009\\u2013\\u200911", |
0f5d89e8 | 535 | |
1546d4af | 536 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "MMM", "Oct\\u2009\\u2013\\u2009Nov", |
0f5d89e8 | 537 | |
1546d4af | 538 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "MMMM", "October\\u2009\\u2013\\u2009November", |
0f5d89e8 | 539 | |
1546d4af A |
540 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "hm", "10/10/2007, 10:10 AM\\u2009\\u2013\\u200911/10/2007, 10:10 AM", |
541 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "Hm", "10/10/2007, 10:10\\u2009\\u2013\\u200911/10/2007, 10:10", | |
542 | "en", "CE 2007 10 10 20:10:10", "CE 2007 11 10 20:10:10", "Hm", "10/10/2007, 20:10\\u2009\\u2013\\u200911/10/2007, 20:10", | |
0f5d89e8 | 543 | |
1546d4af | 544 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "hmv", "10/10/2007, 10:10 AM PT\\u2009\\u2013\\u200911/10/2007, 10:10 AM PT", |
0f5d89e8 | 545 | |
1546d4af | 546 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "hmz", "10/10/2007, 10:10 AM PDT\\u2009\\u2013\\u200911/10/2007, 10:10 AM PST", |
0f5d89e8 | 547 | |
1546d4af | 548 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "h", "10/10/2007, 10 AM\\u2009\\u2013\\u200911/10/2007, 10 AM", |
0f5d89e8 | 549 | |
1546d4af | 550 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "hv", "10/10/2007, 10 AM PT\\u2009\\u2013\\u200911/10/2007, 10 AM PT", |
0f5d89e8 | 551 | |
1546d4af | 552 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "hz", "10/10/2007, 10 AM PDT\\u2009\\u2013\\u200911/10/2007, 10 AM PST", |
0f5d89e8 | 553 | |
1546d4af | 554 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "EEddMMyyyy", "Wed, 10/10/2007\\u2009\\u2013\\u2009Sat, 11/10/2007", |
0f5d89e8 | 555 | |
1546d4af | 556 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "EddMMy", "Wed, 10/10/2007\\u2009\\u2013\\u2009Sat, 11/10/2007", |
0f5d89e8 A |
557 | |
558 | ||
1546d4af | 559 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "hhmmzz", "10/10/2007, 10:10 AM PDT\\u2009\\u2013\\u200911/10/2007, 10:10 AM PST", |
0f5d89e8 | 560 | |
1546d4af | 561 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "hms", "10/10/2007, 10:10:10 AM\\u2009\\u2013\\u200911/10/2007, 10:10:10 AM", |
0f5d89e8 | 562 | |
1546d4af | 563 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "dMMMMMy", "O 10\\u2009\\u2013\\u2009N 10, 2007", |
0f5d89e8 | 564 | |
1546d4af | 565 | "en", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "EEEEEdM", "W, 10/10\\u2009\\u2013\\u2009S, 11/10", |
0f5d89e8 | 566 | |
1546d4af | 567 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EEEEdMMMMy", "Saturday, November 10\\u2009\\u2013\\u2009Tuesday, November 20, 2007", |
0f5d89e8 | 568 | |
1546d4af | 569 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "dMMMMy", "November 10\\u2009\\u2013\\u200920, 2007", |
0f5d89e8 | 570 | |
1546d4af | 571 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "dMMMM", "November 10\\u2009\\u2013\\u200920", |
0f5d89e8 A |
572 | |
573 | ||
1546d4af | 574 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EEEEdMMMM", "Saturday, November 10\\u2009\\u2013\\u2009Tuesday, November 20", |
0f5d89e8 | 575 | |
1546d4af | 576 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EdMMMy", "Sat, Nov 10\\u2009\\u2013\\u2009Tue, Nov 20, 2007", |
0f5d89e8 | 577 | |
1546d4af | 578 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "dMMMy", "Nov 10\\u2009\\u2013\\u200920, 2007", |
0f5d89e8 | 579 | |
1546d4af | 580 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "dMMM", "Nov 10\\u2009\\u2013\\u200920", |
0f5d89e8 | 581 | |
1546d4af | 582 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "MMMy", "Nov 2007", |
0f5d89e8 | 583 | |
1546d4af | 584 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EdMMM", "Sat, Nov 10\\u2009\\u2013\\u2009Tue, Nov 20", |
0f5d89e8 | 585 | |
1546d4af | 586 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EdMy", "Sat, 11/10/2007\\u2009\\u2013\\u2009Tue, 11/20/2007", |
0f5d89e8 | 587 | |
1546d4af | 588 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "dMy", "11/10/2007\\u2009\\u2013\\u200911/20/2007", |
0f5d89e8 | 589 | |
1546d4af | 590 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "dM", "11/10\\u2009\\u2013\\u200911/20", |
0f5d89e8 | 591 | |
1546d4af | 592 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "My", "11/2007", |
0f5d89e8 | 593 | |
1546d4af | 594 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EdM", "Sat, 11/10\\u2009\\u2013\\u2009Tue, 11/20", |
0f5d89e8 | 595 | |
1546d4af | 596 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "d", "10\\u2009\\u2013\\u200920", |
0f5d89e8 | 597 | |
1546d4af | 598 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "Ed", "10 Sat\\u2009\\u2013\\u200920 Tue", |
0f5d89e8 | 599 | |
1546d4af | 600 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "y", "2007", |
0f5d89e8 | 601 | |
1546d4af | 602 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "M", "11", |
0f5d89e8 | 603 | |
1546d4af | 604 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "MMM", "Nov", |
0f5d89e8 | 605 | |
1546d4af | 606 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "MMMM", "November", |
0f5d89e8 | 607 | |
1546d4af A |
608 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "hm", "11/10/2007, 10:10 AM\\u2009\\u2013\\u200911/20/2007, 10:10 AM", |
609 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "Hm", "11/10/2007, 10:10\\u2009\\u2013\\u200911/20/2007, 10:10", | |
610 | "en", "CE 2007 11 10 20:10:10", "CE 2007 11 20 20:10:10", "Hm", "11/10/2007, 20:10\\u2009\\u2013\\u200911/20/2007, 20:10", | |
0f5d89e8 | 611 | |
1546d4af | 612 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "hmv", "11/10/2007, 10:10 AM PT\\u2009\\u2013\\u200911/20/2007, 10:10 AM PT", |
0f5d89e8 | 613 | |
1546d4af | 614 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "hmz", "11/10/2007, 10:10 AM PST\\u2009\\u2013\\u200911/20/2007, 10:10 AM PST", |
0f5d89e8 | 615 | |
1546d4af | 616 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "h", "11/10/2007, 10 AM\\u2009\\u2013\\u200911/20/2007, 10 AM", |
0f5d89e8 | 617 | |
1546d4af | 618 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "hv", "11/10/2007, 10 AM PT\\u2009\\u2013\\u200911/20/2007, 10 AM PT", |
0f5d89e8 | 619 | |
1546d4af | 620 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "hz", "11/10/2007, 10 AM PST\\u2009\\u2013\\u200911/20/2007, 10 AM PST", |
0f5d89e8 | 621 | |
1546d4af | 622 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EEddMMyyyy", "Sat, 11/10/2007\\u2009\\u2013\\u2009Tue, 11/20/2007", |
0f5d89e8 | 623 | |
1546d4af | 624 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EddMMy", "Sat, 11/10/2007\\u2009\\u2013\\u2009Tue, 11/20/2007", |
0f5d89e8 | 625 | |
1546d4af | 626 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "hhmm", "11/10/2007, 10:10 AM\\u2009\\u2013\\u200911/20/2007, 10:10 AM", |
0f5d89e8 | 627 | |
1546d4af | 628 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "hhmmzz", "11/10/2007, 10:10 AM PST\\u2009\\u2013\\u200911/20/2007, 10:10 AM PST", |
0f5d89e8 | 629 | |
1546d4af A |
630 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "hms", "11/10/2007, 10:10:10 AM\\u2009\\u2013\\u200911/20/2007, 10:10:10 AM", |
631 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "Hms", "11/10/2007, 10:10:10\\u2009\\u2013\\u200911/20/2007, 10:10:10", | |
632 | "en", "CE 2007 11 10 20:10:10", "CE 2007 11 20 20:10:10", "Hms", "11/10/2007, 20:10:10\\u2009\\u2013\\u200911/20/2007, 20:10:10", | |
0f5d89e8 | 633 | |
1546d4af | 634 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "dMMMMMy", "N 10\\u2009\\u2013\\u200920, 2007", |
0f5d89e8 | 635 | |
1546d4af | 636 | "en", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EEEEEdM", "S, 11/10\\u2009\\u2013\\u2009T, 11/20", |
0f5d89e8 | 637 | |
1546d4af | 638 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "EEEEdMMMMy", "Wednesday, January 10, 2007", |
0f5d89e8 | 639 | |
1546d4af | 640 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "dMMMMy", "January 10, 2007", |
0f5d89e8 | 641 | |
1546d4af | 642 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "dMMMM", "January 10", |
0f5d89e8 | 643 | |
1546d4af | 644 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "MMMMy", "January 2007", |
0f5d89e8 | 645 | |
1546d4af | 646 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "EEEEdMMMM", "Wednesday, January 10", |
0f5d89e8 | 647 | |
1546d4af | 648 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "EdMMMy", "Wed, Jan 10, 2007", |
0f5d89e8 | 649 | |
1546d4af | 650 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "dMMMy", "Jan 10, 2007", |
0f5d89e8 | 651 | |
1546d4af | 652 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "dMMM", "Jan 10", |
0f5d89e8 | 653 | |
1546d4af | 654 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "MMMy", "Jan 2007", |
0f5d89e8 | 655 | |
1546d4af | 656 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "EdMMM", "Wed, Jan 10", |
0f5d89e8 A |
657 | |
658 | ||
1546d4af | 659 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "dMy", "1/10/2007", |
0f5d89e8 | 660 | |
1546d4af | 661 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "dM", "1/10", |
0f5d89e8 | 662 | |
1546d4af | 663 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "My", "1/2007", |
0f5d89e8 | 664 | |
1546d4af | 665 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "EdM", "Wed, 1/10", |
0f5d89e8 | 666 | |
1546d4af | 667 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "d", "10", |
0f5d89e8 | 668 | |
1546d4af | 669 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "Ed", "10 Wed", |
0f5d89e8 | 670 | |
1546d4af | 671 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "y", "2007", |
0f5d89e8 | 672 | |
1546d4af | 673 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "M", "1", |
0f5d89e8 | 674 | |
1546d4af | 675 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "MMM", "Jan", |
0f5d89e8 | 676 | |
1546d4af | 677 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "MMMM", "January", |
0f5d89e8 | 678 | |
1546d4af A |
679 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "hm", "10:00 AM\\u2009\\u2013\\u20092:10 PM", |
680 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "Hm", "10:00\\u2009\\u2013\\u200914:10", | |
0f5d89e8 | 681 | |
1546d4af | 682 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "hmv", "10:00 AM\\u2009\\u2013\\u20092:10 PM PT", |
0f5d89e8 | 683 | |
1546d4af | 684 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "hmz", "10:00 AM\\u2009\\u2013\\u20092:10 PM PST", |
0f5d89e8 | 685 | |
1546d4af A |
686 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "h", "10 AM\\u2009\\u2013\\u20092 PM", |
687 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "H", "10\\u2009\\u2013\\u200914", | |
0f5d89e8 A |
688 | |
689 | ||
1546d4af | 690 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "hz", "10 AM\\u2009\\u2013\\u20092 PM PST", |
0f5d89e8 | 691 | |
1546d4af | 692 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "EEddMMyyyy", "Wed, 01/10/2007", |
0f5d89e8 | 693 | |
1546d4af | 694 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "EddMMy", "Wed, 01/10/2007", |
0f5d89e8 | 695 | |
1546d4af A |
696 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "hhmm", "10:00 AM\\u2009\\u2013\\u20092:10 PM", |
697 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "HHmm", "10:00\\u2009\\u2013\\u200914:10", | |
0f5d89e8 | 698 | |
1546d4af | 699 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "hhmmzz", "10:00 AM\\u2009\\u2013\\u20092:10 PM PST", |
0f5d89e8 | 700 | |
1546d4af A |
701 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "hms", "10:00:10 AM\\u2009\\u2013\\u20092:10:10 PM", |
702 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "Hms", "10:00:10\\u2009\\u2013\\u200914:10:10", | |
0f5d89e8 | 703 | |
1546d4af | 704 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "dMMMMMy", "J 10, 2007", |
0f5d89e8 | 705 | |
1546d4af A |
706 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "EEEEEdM", "W, 1/10", |
707 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "dMMMMy", "January 10, 2007", | |
0f5d89e8 | 708 | |
1546d4af | 709 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "dMMMM", "January 10", |
0f5d89e8 | 710 | |
1546d4af | 711 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "MMMMy", "January 2007", |
0f5d89e8 | 712 | |
1546d4af | 713 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "EEEEdMMMM", "Wednesday, January 10", |
0f5d89e8 | 714 | |
1546d4af | 715 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "EdMMMy", "Wed, Jan 10, 2007", |
0f5d89e8 | 716 | |
1546d4af | 717 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "dMMMy", "Jan 10, 2007", |
0f5d89e8 | 718 | |
1546d4af | 719 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "dMMM", "Jan 10", |
0f5d89e8 A |
720 | |
721 | ||
1546d4af | 722 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "EdMMM", "Wed, Jan 10", |
0f5d89e8 | 723 | |
1546d4af | 724 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "EdMy", "Wed, 1/10/2007", |
0f5d89e8 | 725 | |
1546d4af | 726 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "dMy", "1/10/2007", |
0f5d89e8 A |
727 | |
728 | ||
1546d4af | 729 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "My", "1/2007", |
0f5d89e8 | 730 | |
1546d4af | 731 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "EdM", "Wed, 1/10", |
0f5d89e8 | 732 | |
1546d4af | 733 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "d", "10", |
0f5d89e8 A |
734 | |
735 | ||
1546d4af | 736 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "y", "2007", |
0f5d89e8 | 737 | |
1546d4af | 738 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "M", "1", |
0f5d89e8 A |
739 | |
740 | ||
741 | ||
1546d4af A |
742 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "hm", "10:00\\u2009\\u2013\\u200910:20 AM", |
743 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "Hm", "10:00\\u2009\\u2013\\u200910:20", | |
0f5d89e8 A |
744 | |
745 | ||
1546d4af | 746 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "hmz", "10:00\\u2009\\u2013\\u200910:20 AM PST", |
0f5d89e8 A |
747 | |
748 | ||
1546d4af | 749 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "hv", "10 AM PT", |
0f5d89e8 A |
750 | |
751 | ||
752 | ||
1546d4af | 753 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "EddMMy", "Wed, 01/10/2007", |
0f5d89e8 | 754 | |
1546d4af A |
755 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "hhmm", "10:00\\u2009\\u2013\\u200910:20 AM", |
756 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "HHmm", "10:00\\u2009\\u2013\\u200910:20", | |
0f5d89e8 | 757 | |
1546d4af | 758 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "hhmmzz", "10:00\\u2009\\u2013\\u200910:20 AM PST", |
0f5d89e8 A |
759 | |
760 | ||
1546d4af | 761 | "en", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "dMMMMMy", "J 10, 2007", |
0f5d89e8 A |
762 | |
763 | ||
1546d4af | 764 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "EEEEdMMMMy", "Wednesday, January 10, 2007", |
0f5d89e8 | 765 | |
1546d4af | 766 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "dMMMMy", "January 10, 2007", |
0f5d89e8 A |
767 | |
768 | ||
1546d4af | 769 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "MMMMy", "January 2007", |
0f5d89e8 | 770 | |
1546d4af | 771 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "EEEEdMMMM", "Wednesday, January 10", |
0f5d89e8 A |
772 | |
773 | ||
1546d4af | 774 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "dMMMy", "Jan 10, 2007", |
0f5d89e8 | 775 | |
1546d4af | 776 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "dMMM", "Jan 10", |
0f5d89e8 A |
777 | |
778 | ||
1546d4af | 779 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "EdMMM", "Wed, Jan 10", |
0f5d89e8 | 780 | |
1546d4af | 781 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "EdMy", "Wed, 1/10/2007", |
0f5d89e8 | 782 | |
1546d4af | 783 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "dMy", "1/10/2007", |
0f5d89e8 A |
784 | |
785 | ||
1546d4af | 786 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "My", "1/2007", |
0f5d89e8 | 787 | |
1546d4af | 788 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "EdM", "Wed, 1/10", |
0f5d89e8 | 789 | |
1546d4af | 790 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "d", "10", |
0f5d89e8 A |
791 | |
792 | ||
1546d4af | 793 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "y", "2007", |
0f5d89e8 | 794 | |
1546d4af | 795 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "M", "1", |
0f5d89e8 A |
796 | |
797 | ||
1546d4af | 798 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "MMMM", "January", |
0f5d89e8 | 799 | |
1546d4af A |
800 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "hm", "10:10 AM", |
801 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "Hm", "10:10", | |
0f5d89e8 A |
802 | |
803 | ||
1546d4af | 804 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "hmz", "10:10 AM PST", |
0f5d89e8 | 805 | |
1546d4af | 806 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "h", "10 AM", |
0f5d89e8 | 807 | |
1546d4af | 808 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "hv", "10 AM PT", |
0f5d89e8 A |
809 | |
810 | ||
1546d4af | 811 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "EEddMMyyyy", "Wed, 01/10/2007", |
0f5d89e8 A |
812 | |
813 | ||
1546d4af A |
814 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "hhmm", "10:10 AM", |
815 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "HHmm", "10:10", | |
0f5d89e8 | 816 | |
1546d4af | 817 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "hhmmzz", "10:10 AM PST", |
0f5d89e8 A |
818 | |
819 | ||
1546d4af | 820 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "dMMMMMy", "J 10, 2007", |
0f5d89e8 | 821 | |
1546d4af | 822 | "en", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "EEEEEdM", "W, 1/10", |
0f5d89e8 | 823 | |
1546d4af | 824 | "zh", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "EEEEdMMMMy", "2007\\u5e7410\\u670810\\u65e5\\u661f\\u671f\\u4e09\\u81f32008\\u5e7410\\u670810\\u65e5\\u661f\\u671f\\u4e94", |
0f5d89e8 A |
825 | |
826 | ||
1546d4af | 827 | "zh", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "dMMMMy", "2007\\u5e7410\\u670810\\u65e5\\u81f311\\u670810\\u65e5", |
0f5d89e8 A |
828 | |
829 | ||
1546d4af | 830 | "zh", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "MMMMy", "2007\\u5e7410\\u6708\\u81f311\\u6708", |
0f5d89e8 A |
831 | |
832 | ||
1546d4af | 833 | "zh", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "hmv", "2007/10/10 \\u6D1B\\u6749\\u77F6\\u65F6\\u95F4 \\u4E0A\\u534810:10\\u2009\\u2013\\u20092007/11/10 \\u6D1B\\u6749\\u77F6\\u65F6\\u95F4 \\u4E0A\\u534810:10", |
0f5d89e8 | 834 | |
1546d4af | 835 | "zh", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EEEEdMMMMy", "2007\\u5e7411\\u670810\\u65e5\\u661f\\u671f\\u516d\\u81f320\\u65e5\\u661f\\u671f\\u4e8c", |
0f5d89e8 A |
836 | |
837 | ||
1546d4af | 838 | "zh", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "dMMMM", "11\\u670810\\u65e5\\u81f320\\u65e5", |
0f5d89e8 | 839 | |
1546d4af | 840 | "zh", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "MMMMy", "2007\\u5E7411\\u6708", // (fixed expected result per ticket:6626:) |
f3c0d7a5 | 841 | |
1546d4af | 842 | "zh", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EEEEdMMMM", "11\\u670810\\u65e5\\u661f\\u671f\\u516d\\u81f320\\u65e5\\u661f\\u671f\\u4e8c", |
f3c0d7a5 A |
843 | |
844 | ||
1546d4af | 845 | "zh", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EdMy", "2007/11/10\\u5468\\u516d\\u81f32007/11/20\\u5468\\u4e8c", |
f3c0d7a5 A |
846 | |
847 | ||
1546d4af | 848 | "zh", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "dM", "11/10\\u2009\\u2013\\u200911/20", |
f3c0d7a5 | 849 | |
1546d4af | 850 | "zh", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "My", "2007\\u5E7411\\u6708", |
f3c0d7a5 | 851 | |
1546d4af | 852 | "zh", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EdM", "11/10\\u5468\\u516d\\u81f311/20\\u5468\\u4e8c", |
f3c0d7a5 A |
853 | |
854 | ||
1546d4af | 855 | "zh", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "y", "2007\\u5E74", // (fixed expected result per ticket:6626:) |
f3c0d7a5 | 856 | |
1546d4af | 857 | "zh", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "M", "11\\u6708", |
f3c0d7a5 | 858 | |
1546d4af | 859 | "zh", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "MMM", "11\\u6708", // (fixed expected result per ticket:6626: and others) |
0f5d89e8 A |
860 | |
861 | ||
1546d4af | 862 | "zh", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "hmz", "2007/11/10 GMT-8 \\u4e0a\\u534810:10\\u2009\\u2013\\u20092007/11/20 GMT-8 \\u4e0a\\u534810:10", |
0f5d89e8 | 863 | |
1546d4af | 864 | "zh", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "h", "2007/11/10 \\u4e0a\\u534810\\u65f6\\u2009\\u2013\\u20092007/11/20 \\u4e0a\\u534810\\u65f6", |
0f5d89e8 | 865 | |
1546d4af | 866 | "zh", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "EEEEdMMMMy", "2007\\u5e741\\u670810\\u65e5 \\u661f\\u671f\\u4e09", // (fixed expected result per ticket:6626:) |
0f5d89e8 | 867 | |
1546d4af | 868 | "zh", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "hm", "\\u4e0a\\u534810:00\\u81f3\\u4e0b\\u53482:10", |
0f5d89e8 A |
869 | |
870 | ||
1546d4af | 871 | "zh", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "hmz", "GMT-8\\u4e0a\\u534810:00\\u81f3\\u4e0b\\u53482:10", |
0f5d89e8 | 872 | |
1546d4af | 873 | "zh", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "h", "\\u4e0a\\u534810\\u65F6\\u81f3\\u4e0b\\u53482\\u65f6", |
0f5d89e8 | 874 | |
1546d4af | 875 | "zh", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "hv", "\\u6D1B\\u6749\\u77F6\\u65F6\\u95F4\\u4E0A\\u534810\\u65F6\\u81F3\\u4E0B\\u53482\\u65F6", |
f3c0d7a5 | 876 | |
1546d4af | 877 | "zh", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "hm", "\\u4e0a\\u534810:00\\u81f310:20", |
f3c0d7a5 | 878 | |
1546d4af | 879 | "zh", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "hmv", "\\u6D1B\\u6749\\u77F6\\u65F6\\u95F4\\u4E0A\\u534810:00\\u81F310:20", |
0f5d89e8 | 880 | |
1546d4af | 881 | "zh", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "hz", "GMT-8\\u4e0a\\u534810\\u65f6", |
0f5d89e8 | 882 | |
1546d4af | 883 | "zh", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "hm", "\\u4e0a\\u534810:10", |
0f5d89e8 | 884 | |
1546d4af | 885 | "zh", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "h", "\\u4e0a\\u534810\\u65f6", |
0f5d89e8 | 886 | |
1546d4af | 887 | "de", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "EEEEdMMMy", "Mittwoch, 10. Okt. 2007\\u2009\\u2013\\u2009Freitag, 10. Okt. 2008", |
0f5d89e8 A |
888 | |
889 | ||
1546d4af | 890 | "de", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "dMMM", "10. Okt. 2007\\u2009\\u2013\\u200910. Okt. 2008", |
0f5d89e8 | 891 | |
1546d4af | 892 | "de", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "MMMy", "Okt. 2007\\u2009\\u2013\\u2009Okt. 2008", |
0f5d89e8 A |
893 | |
894 | ||
1546d4af | 895 | "de", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "EdMy", "Mi. 10.10.2007\\u2009\\u2013\\u2009Fr. 10.10.2008", |
0f5d89e8 | 896 | |
1546d4af | 897 | "de", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "dMy", "10.10.2007\\u2009\\u2013\\u200910.10.2008", |
0f5d89e8 A |
898 | |
899 | ||
1546d4af | 900 | "de", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "My", "10.2007\\u2009\\u2013\\u200910.2008", |
0f5d89e8 | 901 | |
1546d4af | 902 | "de", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "EdM", "Mi. 10.10.2007\\u2009\\u2013\\u2009Fr. 10.10.2008", |
0f5d89e8 A |
903 | |
904 | ||
1546d4af | 905 | "de", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "y", "2007\\u20132008", |
0f5d89e8 | 906 | |
1546d4af | 907 | "de", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "M", "10.2007\\u2009\\u2013\\u200910.2008", |
0f5d89e8 A |
908 | |
909 | ||
1546d4af A |
910 | "de", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "hm", "10.10.2007, 10:10 AM\\u2009\\u2013\\u200910.10.2008, 10:10 AM", |
911 | "de", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "Hm", "10.10.2007, 10:10\\u2009\\u2013\\u200910.10.2008, 10:10", | |
0f5d89e8 | 912 | |
1546d4af | 913 | "de", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "EEEEdMMMy", "Mittwoch, 10. Okt.\\u2009\\u2013\\u2009Samstag, 10. Nov. 2007", |
0f5d89e8 A |
914 | |
915 | ||
1546d4af | 916 | "de", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "dMMM", "10. Okt.\\u2009\\u2013\\u200910. Nov.", |
0f5d89e8 | 917 | |
1546d4af | 918 | "de", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "MMMy", "Okt.\\u2013Nov. 2007", |
0f5d89e8 | 919 | |
1546d4af | 920 | "de", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "EEEEdMMM", "Mittwoch, 10. Okt.\\u2009\\u2013\\u2009Samstag, 10. Nov.", |
0f5d89e8 A |
921 | |
922 | ||
1546d4af | 923 | "de", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "dM", "10.10.\\u2009\\u2013\\u200910.11.", |
0f5d89e8 | 924 | |
1546d4af | 925 | "de", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "My", "10.2007\\u2009\\u2013\\u200911.2007", |
0f5d89e8 A |
926 | |
927 | ||
1546d4af | 928 | "de", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "d", "10.10.\\u2009\\u2013\\u200910.11.", |
0f5d89e8 | 929 | |
1546d4af | 930 | "de", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "y", "2007", |
0f5d89e8 A |
931 | |
932 | ||
1546d4af | 933 | "de", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "MMM", "Okt.\\u2013Nov.", |
0f5d89e8 A |
934 | |
935 | ||
1546d4af A |
936 | "de", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "hms", "10.10.2007, 10:10:10 AM\\u2009\\u2013\\u200910.11.2007, 10:10:10 AM", |
937 | "de", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "Hms", "10.10.2007, 10:10:10\\u2009\\u2013\\u200910.11.2007, 10:10:10", | |
0f5d89e8 | 938 | |
1546d4af | 939 | "de", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EEEEdMMMy", "Samstag, 10.\\u2009\\u2013\\u2009Dienstag, 20. Nov. 2007", |
0f5d89e8 | 940 | |
1546d4af | 941 | "de", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "dMMMy", "10.\\u201320. Nov. 2007", |
0f5d89e8 A |
942 | |
943 | ||
1546d4af | 944 | "de", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "MMMy", "Nov. 2007", |
0f5d89e8 | 945 | |
1546d4af | 946 | "de", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EEEEdMMM", "Samstag, 10.\\u2009\\u2013\\u2009Dienstag, 20. Nov.", |
0f5d89e8 | 947 | |
3d1f044b | 948 | "de", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EdMy", "Sa. 10.\\u2009\\u2013\\u2009Di. 20.11.2007", |
0f5d89e8 A |
949 | |
950 | ||
3d1f044b | 951 | "de", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "dM", "10.\\u201320.11.", |
0f5d89e8 | 952 | |
1546d4af | 953 | "de", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "My", "11.2007", |
0f5d89e8 A |
954 | |
955 | ||
1546d4af | 956 | "de", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "d", "10.\\u201320.", |
0f5d89e8 | 957 | |
1546d4af | 958 | "de", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "y", "2007", |
0f5d89e8 A |
959 | |
960 | ||
1546d4af | 961 | "de", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "hmv", "10.11.2007, 10:10 AM Los Angeles Zeit\\u2009\\u2013\\u200920.11.2007, 10:10 AM Los Angeles Zeit", |
0f5d89e8 | 962 | |
1546d4af | 963 | "de", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "EEEEdMMMy", "Mittwoch, 10. Jan. 2007", |
0f5d89e8 A |
964 | |
965 | ||
1546d4af | 966 | "de", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "dMMM", "10. Jan.", |
0f5d89e8 | 967 | |
1546d4af | 968 | "de", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "MMMy", "Jan. 2007", |
0f5d89e8 | 969 | |
1546d4af | 970 | "de", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "EEEEdMMM", "Mittwoch, 10. Jan.", |
0f5d89e8 A |
971 | |
972 | /* Following is an important test, because the 'h' in 'Uhr' is interpreted as a pattern | |
973 | if not escaped properly. */ | |
1546d4af A |
974 | "de", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "h", "10 AM\\u2009\\u2013\\u20092 PM", |
975 | "de", "CE 2007 01 10 10:00:10", "CE 2007 01 10 14:10:10", "H", "10\\u201314 Uhr", | |
0f5d89e8 | 976 | |
1546d4af | 977 | "de", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "EEEEdMMM", "Mittwoch, 10. Jan.", |
0f5d89e8 A |
978 | |
979 | ||
1546d4af | 980 | "de", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "hmv", "10:00\\u201310:20 AM Los Angeles Zeit", |
0f5d89e8 | 981 | |
1546d4af | 982 | "de", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "hmz", "10:00\\u201310:20 AM GMT-8", |
0f5d89e8 | 983 | |
1546d4af A |
984 | "de", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "h", "10 AM", |
985 | "de", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "H", "10 Uhr", | |
0f5d89e8 A |
986 | |
987 | ||
1546d4af | 988 | "de", "CE 2007 01 10 10:00:10", "CE 2007 01 10 10:20:10", "hz", "10 AM GMT-8", |
0f5d89e8 | 989 | |
1546d4af | 990 | "de", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "EEEEdMMMy", "Mittwoch, 10. Jan. 2007", |
0f5d89e8 A |
991 | |
992 | ||
1546d4af | 993 | "de", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "hmv", "10:10 AM Los Angeles Zeit", |
0f5d89e8 | 994 | |
1546d4af | 995 | "de", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "hmz", "10:10 AM GMT-8", |
0f5d89e8 A |
996 | |
997 | ||
1546d4af | 998 | "de", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "hv", "10 AM Los Angeles Zeit", |
0f5d89e8 | 999 | |
1546d4af | 1000 | "de", "CE 2007 01 10 10:10:10", "CE 2007 01 10 10:10:20", "hz", "10 AM GMT-8", |
0f5d89e8 | 1001 | |
729e4ab9 A |
1002 | // Thai (default calendar buddhist) |
1003 | ||
1546d4af | 1004 | "th", "BE 2550 10 10 10:10:10", "BE 2551 10 10 10:10:10", "EEEEdMMMy", "\\u0E27\\u0E31\\u0E19\\u0E1E\\u0E38\\u0E18\\u0E17\\u0E35\\u0E48 10 \\u0E15.\\u0E04. 2550 \\u2013 \\u0E27\\u0E31\\u0E19\\u0E28\\u0E38\\u0E01\\u0E23\\u0E4C\\u0E17\\u0E35\\u0E48 10 \\u0E15.\\u0E04. 2551", |
f3c0d7a5 A |
1005 | |
1006 | ||
1546d4af | 1007 | "th", "BE 2550 10 10 10:10:10", "BE 2551 10 10 10:10:10", "dMMM", "10 \\u0E15.\\u0E04. 2550 \\u2013 10 \\u0E15.\\u0E04. 2551", |
f3c0d7a5 | 1008 | |
1546d4af | 1009 | "th", "BE 2550 10 10 10:10:10", "BE 2551 10 10 10:10:10", "MMMy", "\\u0E15.\\u0E04. 2550 \\u2013 \\u0E15.\\u0E04. 2551", |
f3c0d7a5 A |
1010 | |
1011 | ||
1546d4af | 1012 | "th", "BE 2550 10 10 10:10:10", "BE 2551 10 10 10:10:10", "EdMy", "\\u0E1E. 10/10/2550 \\u2013 \\u0E28. 10/10/2551", |
f3c0d7a5 | 1013 | |
1546d4af | 1014 | "th", "BE 2550 10 10 10:10:10", "BE 2551 10 10 10:10:10", "dMy", "10/10/2550 \\u2013 10/10/2551", |
f3c0d7a5 A |
1015 | |
1016 | ||
1546d4af | 1017 | "th", "BE 2550 10 10 10:10:10", "BE 2551 10 10 10:10:10", "My", "10/2550 \\u2013 10/2551", |
f3c0d7a5 | 1018 | |
1546d4af | 1019 | "th", "BE 2550 10 10 10:10:10", "BE 2551 10 10 10:10:10", "EdM", "\\u0E1E. 10/10/2550 \\u2013 \\u0E28. 10/10/2551", |
f3c0d7a5 A |
1020 | |
1021 | ||
1546d4af | 1022 | "th", "BE 2550 10 10 10:10:10", "BE 2551 10 10 10:10:10", "y", "2550\\u20132551", |
f3c0d7a5 | 1023 | |
1546d4af | 1024 | "th", "BE 2550 10 10 10:10:10", "BE 2551 10 10 10:10:10", "M", "10/2550 \\u2013 10/2551", |
f3c0d7a5 A |
1025 | |
1026 | ||
1546d4af | 1027 | "th", "BE 2550 10 10 10:10:10", "BE 2550 11 10 10:10:10", "EEEEdMMMy", "\\u0E27\\u0E31\\u0E19\\u0E1E\\u0E38\\u0E18\\u0E17\\u0E35\\u0E48 10 \\u0E15.\\u0E04. \\u2013 \\u0E27\\u0E31\\u0E19\\u0E40\\u0E2A\\u0E32\\u0E23\\u0E4C\\u0E17\\u0E35\\u0E48 10 \\u0E1E.\\u0E22. 2550", |
f3c0d7a5 A |
1028 | |
1029 | ||
1546d4af | 1030 | "th", "BE 2550 10 10 10:10:10", "BE 2550 11 10 10:10:10", "dMMM", "10 \\u0E15.\\u0E04. \\u2013 10 \\u0E1E.\\u0E22.", |
f3c0d7a5 | 1031 | |
1546d4af | 1032 | "th", "BE 2550 10 10 10:10:10", "BE 2550 11 10 10:10:10", "MMMy", "\\u0E15.\\u0E04.\\u2013\\u0E1E.\\u0E22. 2550", |
f3c0d7a5 | 1033 | |
3d1f044b | 1034 | "th", "2550 10 10 10:10:10", "2550 11 10 10:10:10", "dM", "10/10 \\u2013 10/11", |
f3c0d7a5 | 1035 | |
1546d4af | 1036 | "th", "BE 2550 10 10 10:10:10", "BE 2550 11 10 10:10:10", "My", "10/2550 \\u2013 11/2550", |
f3c0d7a5 A |
1037 | |
1038 | ||
1546d4af | 1039 | "th", "BE 2550 10 10 10:10:10", "BE 2550 11 10 10:10:10", "d", "10/10 \\u2013 10/11", |
f3c0d7a5 | 1040 | |
1546d4af | 1041 | "th", "BE 2550 10 10 10:10:10", "BE 2550 11 10 10:10:10", "y", "\\u0E1E.\\u0E28. 2550", |
f3c0d7a5 A |
1042 | |
1043 | ||
1546d4af A |
1044 | "th", "BE 2550 10 10 10:10:10", "BE 2550 11 10 10:10:10", "MMM", "\\u0E15.\\u0E04.\\u2013\\u0E1E.\\u0E22.", |
1045 | ||
1046 | // Tests for Japanese calendar with eras, including new era in 2019 (Heisei 31 through April 30, then new era) | |
1047 | ||
1048 | "en-u-ca-japanese", "H 31 03 15 09:00:00", "H 31 04 15 09:00:00", "GyMMMd", "Mar 15\\u2009\\u2013\\u2009Apr 15, 31 Heisei", | |
1049 | ||
1050 | "en-u-ca-japanese", "H 31 03 15 09:00:00", "H 31 04 15 09:00:00", "GGGGGyMd", "3/15/31\\u2009\\u2013\\u20094/15/31 H", | |
1051 | ||
1052 | "en-u-ca-japanese", "S 64 01 05 09:00:00", "H 1 01 15 09:00:00", "GyMMMd", "Jan 5, 64 Sh\\u014Dwa\\u2009\\u2013\\u2009Jan 15, 1 Heisei", | |
1053 | ||
3d1f044b A |
1054 | "en-u-ca-japanese", "S 64 01 05 09:00:00", "H 1 01 15 09:00:00", "yMMMd", "Jan 5, 64 Sh\\u014Dwa\\u2009\\u2013\\u2009Jan 15, 1 Heisei", |
1055 | ||
1546d4af | 1056 | "en-u-ca-japanese", "S 64 01 05 09:00:00", "H 1 01 15 09:00:00", "GGGGGyMd", "1/5/64 S\\u2009\\u2013\\u20091/15/1 H", |
3d1f044b A |
1057 | |
1058 | "en-u-ca-japanese", "S 64 01 05 09:00:00", "H 1 01 15 09:00:00", "yMd", "1/5/64 S\\u2009\\u2013\\u20091/15/1 H", | |
1059 | ||
1060 | "en-u-ca-japanese", "S 64 01 05 09:00:00", "H 1 01 15 09:00:00", "yyMd", "1/5/64 S\\u2009\\u2013\\u20091/15/1 H", | |
1061 | ||
1546d4af A |
1062 | "en-u-ca-japanese", "H 31 04 15 09:00:00", JP_ERA_2019_NARROW " 1 05 15 09:00:00", "GyMMMd", "Apr 15, 31 Heisei\\u2009\\u2013\\u2009May 15, 1 " JP_ERA_2019_ROOT, |
1063 | ||
1064 | "en-u-ca-japanese", "H 31 04 15 09:00:00", JP_ERA_2019_NARROW " 1 05 15 09:00:00", "GGGGGyMd", "4/15/31 H\\u2009\\u2013\\u20095/15/1 " JP_ERA_2019_NARROW, | |
3d1f044b A |
1065 | |
1066 | ||
1546d4af A |
1067 | "ja-u-ca-japanese", "H 31 03 15 09:00:00", "H 31 04 15 09:00:00", "GyMMMd", "\\u5E73\\u621031\\u5E743\\u670815\\u65E5\\uFF5E4\\u670815\\u65E5", |
1068 | ||
1069 | "ja-u-ca-japanese", "H 31 03 15 09:00:00", "H 31 04 15 09:00:00", "GGGGGyMd", "H31/03/15\\uFF5E31/04/15", | |
1070 | ||
1071 | "ja-u-ca-japanese", "S 64 01 05 09:00:00", "H 1 01 15 09:00:00", "GyMMMd", "\\u662D\\u548C64\\u5E741\\u67085\\u65E5\\uFF5E\\u5E73\\u6210\\u5143\\u5E741\\u670815\\u65E5", | |
1072 | ||
3d1f044b A |
1073 | "ja-u-ca-japanese", "S 64 01 05 09:00:00", "H 1 01 15 09:00:00", "yMMMd", "\\u662D\\u548C64\\u5E741\\u67085\\u65E5\\uFF5E\\u5E73\\u6210\\u5143\\u5E741\\u670815\\u65E5", |
1074 | ||
1546d4af A |
1075 | "ja-u-ca-japanese", "S 64 01 05 09:00:00", "H 1 01 15 09:00:00", "GGGGGyMd", "S64/01/05\\uFF5EH1/01/15", |
1076 | ||
3d1f044b A |
1077 | "ja-u-ca-japanese", "S 64 01 05 09:00:00", "H 1 01 15 09:00:00", "yyMMdd", "S64/01/05\\uFF5EH1/01/15", |
1078 | ||
1546d4af | 1079 | "ja-u-ca-japanese", "H 31 04 15 09:00:00", JP_ERA_2019_NARROW " 1 05 15 09:00:00", "GGGGGyMd", "H31/04/15\\uFF5E" JP_ERA_2019_NARROW "1/05/15", |
729e4ab9 | 1080 | |
3d1f044b A |
1081 | "ja-u-ca-japanese", "H 31 04 15 09:00:00", JP_ERA_2019_NARROW " 1 05 15 09:00:00", "yyMMdd", "H31/04/15\\uFF5E" JP_ERA_2019_NARROW "1/05/15", |
1082 | ||
9f1b1155 | 1083 | "ar@calendar=islamic", "1438 10 10 10:10:10", "1438 10 20 10:10:10", "MMMd", "\\u0661\\u0660\\u2013\\u0662\\u0660 \\u0634\\u0648\\u0627\\u0644", |
46f4442e | 1084 | }; |
2ca993e8 | 1085 | expect(DATA, UPRV_LENGTHOF(DATA)); |
46f4442e A |
1086 | } |
1087 | ||
1088 | ||
1089 | void DateIntervalFormatTest::expect(const char** data, int32_t data_length) { | |
1090 | int32_t i = 0; | |
1091 | UErrorCode ec = U_ZERO_ERROR; | |
1092 | UnicodeString str, str2; | |
1546d4af | 1093 | const char* pattern = data[i++]; |
46f4442e | 1094 | |
46f4442e A |
1095 | while (i<data_length) { |
1096 | const char* locName = data[i++]; | |
1546d4af A |
1097 | const char* datestr = data[i++]; |
1098 | const char* datestr_2 = data[i++]; | |
1099 | ||
46f4442e | 1100 | Locale loc(locName); |
1546d4af A |
1101 | LocalPointer<Calendar> defCal(Calendar::createInstance(loc, ec)); |
1102 | if (U_FAILURE(ec)) { | |
1103 | dataerrln("Calendar::createInstance fails for loc %s with: %s", locName, u_errorName(ec)); | |
1104 | return; | |
1105 | } | |
1106 | const char* calType = defCal->getType(); | |
3d1f044b | 1107 | |
1546d4af A |
1108 | Locale refLoc("root"); |
1109 | if (calType) { | |
1110 | refLoc.setKeywordValue("calendar", calType, ec); | |
1111 | } | |
1112 | SimpleDateFormat ref(pattern, refLoc, ec); | |
f3c0d7a5 | 1113 | logln( "case %d, locale: %s\n", (i-1)/5, locName); |
729e4ab9 A |
1114 | if (U_FAILURE(ec)) { |
1115 | dataerrln("contruct SimpleDateFormat in expect failed: %s", u_errorName(ec)); | |
1116 | return; | |
1117 | } | |
1546d4af | 1118 | |
46f4442e | 1119 | // 'f' |
f3c0d7a5 | 1120 | logln("original date: %s - %s\n", datestr, datestr_2); |
46f4442e A |
1121 | UDate date = ref.parse(ctou(datestr), ec); |
1122 | if (!assertSuccess("parse 1st data in expect", ec)) return; | |
1123 | UDate date_2 = ref.parse(ctou(datestr_2), ec); | |
1124 | if (!assertSuccess("parse 2nd data in expect", ec)) return; | |
1125 | DateInterval dtitv(date, date_2); | |
1126 | ||
f3c0d7a5 | 1127 | const UnicodeString& oneSkeleton(ctou(data[i++])); |
46f4442e A |
1128 | |
1129 | DateIntervalFormat* dtitvfmt = DateIntervalFormat::createInstance(oneSkeleton, loc, ec); | |
1130 | if (!assertSuccess("createInstance(skeleton) in expect", ec)) return; | |
f3c0d7a5 | 1131 | FieldPosition pos(FieldPosition::DONT_CARE); |
46f4442e A |
1132 | dtitvfmt->format(&dtitv, str.remove(), pos, ec); |
1133 | if (!assertSuccess("format in expect", ec)) return; | |
f3c0d7a5 | 1134 | assertEquals((UnicodeString)"\"" + locName + "\\" + oneSkeleton + "\\" + ctou(datestr) + "\\" + ctou(datestr_2) + "\"", ctou(data[i++]), str); |
46f4442e | 1135 | |
f3c0d7a5 A |
1136 | logln("interval date:" + str + "\"" + locName + "\", " |
1137 | + "\"" + datestr + "\", " | |
1138 | + "\"" + datestr_2 + "\", " + oneSkeleton); | |
46f4442e A |
1139 | delete dtitvfmt; |
1140 | } | |
1141 | } | |
1142 | ||
1143 | ||
f3c0d7a5 | 1144 | /* |
46f4442e A |
1145 | * Test format using user defined DateIntervalInfo |
1146 | */ | |
1147 | void DateIntervalFormatTest::testFormatUserDII() { | |
1148 | // first item is date pattern | |
1149 | const char* DATA[] = { | |
f3c0d7a5 A |
1150 | "yyyy MM dd HH:mm:ss", |
1151 | "en", "2007 10 10 10:10:10", "2008 10 10 10:10:10", "Oct 10, 2007 --- Oct 10, 2008", | |
1152 | ||
1153 | "en", "2007 10 10 10:10:10", "2007 11 10 10:10:10", "2007 Oct 10 - Nov 2007", | |
1154 | ||
1155 | "en", "2007 11 10 10:10:10", "2007 11 20 10:10:10", "Nov 10, 2007 --- Nov 20, 2007", | |
1156 | ||
1157 | "en", "2007 01 10 10:00:10", "2007 01 10 14:10:10", "Jan 10, 2007", | |
1158 | ||
1159 | "en", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "Jan 10, 2007", | |
1160 | ||
1161 | "en", "2007 01 10 10:10:10", "2007 01 10 10:10:20", "Jan 10, 2007", | |
1162 | ||
1163 | "zh", "2007 10 10 10:10:10", "2008 10 10 10:10:10", "2007\\u5e7410\\u670810\\u65e5 --- 2008\\u5e7410\\u670810\\u65e5", | |
1164 | ||
1165 | "zh", "2007 10 10 10:10:10", "2007 11 10 10:10:10", "2007 10\\u6708 10 - 11\\u6708 2007", | |
1166 | ||
1167 | "zh", "2007 11 10 10:10:10", "2007 11 20 10:10:10", "2007\\u5e7411\\u670810\\u65e5 --- 2007\\u5e7411\\u670820\\u65e5", | |
1168 | ||
46f4442e | 1169 | "zh", "2007 01 10 10:00:10", "2007 01 10 14:10:10", "2007\\u5e741\\u670810\\u65e5", // (fixed expected result per ticket:6626:) |
f3c0d7a5 | 1170 | |
46f4442e | 1171 | "zh", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "2007\\u5e741\\u670810\\u65e5", // (fixed expected result per ticket:6626:) |
f3c0d7a5 | 1172 | |
46f4442e | 1173 | "zh", "2007 01 10 10:10:10", "2007 01 10 10:10:20", "2007\\u5e741\\u670810\\u65e5", // (fixed expected result per ticket:6626:) |
0f5d89e8 A |
1174 | |
1175 | "de", "2007 10 10 10:10:10", "2008 10 10 10:10:10", "10. Okt. 2007 --- 10. Okt. 2008", | |
1176 | ||
1177 | ||
1178 | "de", "2007 11 10 10:10:10", "2007 11 20 10:10:10", "10. Nov. 2007 --- 20. Nov. 2007", | |
1179 | ||
1180 | "de", "2007 01 10 10:00:10", "2007 01 10 14:10:10", "10. Jan. 2007", | |
1181 | ||
1182 | "de", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "10. Jan. 2007", | |
1183 | ||
1184 | ||
1185 | "es", "2007 10 10 10:10:10", "2008 10 10 10:10:10", "10 oct 2007 --- 10 oct 2008", | |
1186 | ||
1187 | "es", "2007 10 10 10:10:10", "2007 11 10 10:10:10", "2007 oct 10 - nov 2007", | |
1188 | ||
1189 | "es", "2007 11 10 10:10:10", "2007 11 20 10:10:10", "10 nov 2007 --- 20 nov 2007", | |
1190 | ||
1191 | "es", "2007 01 10 10:00:10", "2007 01 10 14:10:10", "10 ene 2007", | |
1192 | ||
1193 | "es", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "10 ene 2007", | |
1194 | ||
1195 | "es", "2007 01 10 10:10:10", "2007 01 10 10:10:20", "10 ene 2007", | |
46f4442e | 1196 | }; |
2ca993e8 | 1197 | expectUserDII(DATA, UPRV_LENGTHOF(DATA)); |
46f4442e A |
1198 | } |
1199 | ||
1200 | ||
51004dcb A |
1201 | void DateIntervalFormatTest::testSetIntervalPatternNoSideEffect() { |
1202 | UErrorCode ec = U_ZERO_ERROR; | |
b331163b | 1203 | LocalPointer<DateIntervalInfo> dtitvinf(new DateIntervalInfo(ec), ec); |
51004dcb A |
1204 | if (U_FAILURE(ec)) { |
1205 | errln("Failure encountered: %s", u_errorName(ec)); | |
1206 | return; | |
1207 | } | |
1208 | UnicodeString expected; | |
1209 | dtitvinf->getIntervalPattern(ctou("yMd"), UCAL_DATE, expected, ec); | |
1210 | dtitvinf->setIntervalPattern(ctou("yMd"), UCAL_DATE, ctou("M/d/y \\u2013 d"), ec); | |
1211 | if (U_FAILURE(ec)) { | |
1212 | errln("Failure encountered: %s", u_errorName(ec)); | |
1213 | return; | |
1214 | } | |
b331163b | 1215 | dtitvinf.adoptInsteadAndCheckErrorCode(new DateIntervalInfo(ec), ec); |
51004dcb A |
1216 | if (U_FAILURE(ec)) { |
1217 | errln("Failure encountered: %s", u_errorName(ec)); | |
1218 | return; | |
1219 | } | |
1220 | UnicodeString actual; | |
1221 | dtitvinf->getIntervalPattern(ctou("yMd"), UCAL_DATE, actual, ec); | |
1222 | if (U_FAILURE(ec)) { | |
1223 | errln("Failure encountered: %s", u_errorName(ec)); | |
1224 | return; | |
1225 | } | |
1226 | if (expected != actual) { | |
1227 | errln("DateIntervalInfo.setIntervalPattern should have no side effects."); | |
1228 | } | |
1229 | } | |
1230 | ||
57a6839d A |
1231 | void DateIntervalFormatTest::testYearFormats() { |
1232 | const Locale &enLocale = Locale::getEnglish(); | |
1233 | UErrorCode status = U_ZERO_ERROR; | |
1234 | LocalPointer<Calendar> fromTime(Calendar::createInstance(enLocale, status)); | |
1235 | LocalPointer<Calendar> toTime(Calendar::createInstance(enLocale, status)); | |
1236 | if (U_FAILURE(status)) { | |
1237 | errln("Failure encountered: %s", u_errorName(status)); | |
1238 | return; | |
1239 | } | |
1240 | // April 26, 113. Three digit year so that we can test 2 digit years; | |
1241 | // 4 digit years with padded 0's and full years. | |
1242 | fromTime->set(113, 3, 26); | |
1243 | // April 28, 113. | |
1244 | toTime->set(113, 3, 28); | |
1245 | { | |
1246 | LocalPointer<DateIntervalFormat> dif(DateIntervalFormat::createInstance("yyyyMd", enLocale, status)); | |
1247 | if (U_FAILURE(status)) { | |
1248 | dataerrln("Failure encountered: %s", u_errorName(status)); | |
1249 | return; | |
1250 | } | |
1251 | UnicodeString actual; | |
f3c0d7a5 | 1252 | UnicodeString expected(ctou("4/26/0113\\u2009\\u2013\\u20094/28/0113")); |
57a6839d A |
1253 | FieldPosition pos = 0; |
1254 | dif->format(*fromTime, *toTime, actual, pos, status); | |
1255 | if (U_FAILURE(status)) { | |
1256 | errln("Failure encountered: %s", u_errorName(status)); | |
1257 | return; | |
1258 | } | |
1259 | if (actual != expected) { | |
1260 | errln("Expected " + expected + ", got: " + actual); | |
1261 | } | |
1262 | } | |
1263 | { | |
1264 | LocalPointer<DateIntervalFormat> dif(DateIntervalFormat::createInstance("yyMd", enLocale, status)); | |
1265 | if (U_FAILURE(status)) { | |
1266 | errln("Failure encountered: %s", u_errorName(status)); | |
1267 | return; | |
1268 | } | |
1269 | UnicodeString actual; | |
f3c0d7a5 A |
1270 | UnicodeString expected(ctou("4/26/13\\u2009\\u2013\\u20094/28/13")); |
1271 | FieldPosition pos(FieldPosition::DONT_CARE); | |
57a6839d A |
1272 | dif->format(*fromTime, *toTime, actual, pos, status); |
1273 | if (U_FAILURE(status)) { | |
1274 | errln("Failure encountered: %s", u_errorName(status)); | |
1275 | return; | |
1276 | } | |
1277 | if (actual != expected) { | |
1278 | errln("Expected " + expected + ", got: " + actual); | |
1279 | } | |
1280 | } | |
1281 | { | |
1282 | LocalPointer<DateIntervalFormat> dif(DateIntervalFormat::createInstance("yMd", enLocale, status)); | |
1283 | if (U_FAILURE(status)) { | |
1284 | errln("Failure encountered: %s", u_errorName(status)); | |
1285 | return; | |
1286 | } | |
1287 | UnicodeString actual; | |
f3c0d7a5 A |
1288 | UnicodeString expected(ctou("4/26/113\\u2009\\u2013\\u20094/28/113")); |
1289 | FieldPosition pos(FieldPosition::DONT_CARE); | |
57a6839d A |
1290 | dif->format(*fromTime, *toTime, actual, pos, status); |
1291 | if (U_FAILURE(status)) { | |
1292 | errln("Failure encountered: %s", u_errorName(status)); | |
1293 | return; | |
1294 | } | |
1295 | if (actual != expected) { | |
1296 | errln("Expected " + expected + ", got: " + actual); | |
1297 | } | |
1298 | } | |
1299 | } | |
51004dcb | 1300 | |
f3c0d7a5 | 1301 | void DateIntervalFormatTest::expectUserDII(const char** data, |
46f4442e A |
1302 | int32_t data_length) { |
1303 | int32_t i = 0; | |
1304 | UnicodeString str; | |
1305 | UErrorCode ec = U_ZERO_ERROR; | |
1306 | const char* pattern = data[0]; | |
1307 | i++; | |
1308 | ||
1309 | while ( i < data_length ) { | |
1310 | const char* locName = data[i++]; | |
1311 | Locale loc(locName); | |
1312 | SimpleDateFormat ref(pattern, loc, ec); | |
729e4ab9 A |
1313 | if (U_FAILURE(ec)) { |
1314 | dataerrln("contruct SimpleDateFormat in expectUserDII failed: %s", u_errorName(ec)); | |
1315 | return; | |
1316 | } | |
46f4442e A |
1317 | const char* datestr = data[i++]; |
1318 | const char* datestr_2 = data[i++]; | |
1319 | UDate date = ref.parse(ctou(datestr), ec); | |
1320 | if (!assertSuccess("parse in expectUserDII", ec)) return; | |
1321 | UDate date_2 = ref.parse(ctou(datestr_2), ec); | |
1322 | if (!assertSuccess("parse in expectUserDII", ec)) return; | |
1323 | DateInterval dtitv(date, date_2); | |
1324 | ||
1325 | ec = U_ZERO_ERROR; | |
1326 | // test user created DateIntervalInfo | |
1327 | DateIntervalInfo* dtitvinf = new DateIntervalInfo(ec); | |
1328 | dtitvinf->setFallbackIntervalPattern("{0} --- {1}", ec); | |
1329 | dtitvinf->setIntervalPattern(UDAT_YEAR_ABBR_MONTH_DAY, UCAL_MONTH, "yyyy MMM d - MMM y",ec); | |
1330 | if (!assertSuccess("DateIntervalInfo::setIntervalPattern", ec)) return; | |
1331 | dtitvinf->setIntervalPattern(UDAT_YEAR_ABBR_MONTH_DAY, UCAL_HOUR_OF_DAY, "yyyy MMM d HH:mm - HH:mm", ec); | |
1332 | if (!assertSuccess("DateIntervalInfo::setIntervalPattern", ec)) return; | |
1333 | DateIntervalFormat* dtitvfmt = DateIntervalFormat::createInstance(UDAT_YEAR_ABBR_MONTH_DAY, loc, *dtitvinf, ec); | |
1334 | delete dtitvinf; | |
1335 | if (!assertSuccess("createInstance(skeleton,dtitvinf) in expectUserDII", ec)) return; | |
f3c0d7a5 | 1336 | FieldPosition pos(FieldPosition::DONT_CARE); |
46f4442e A |
1337 | dtitvfmt->format(&dtitv, str.remove(), pos, ec); |
1338 | if (!assertSuccess("format in expectUserDII", ec)) return; | |
1339 | assertEquals((UnicodeString)"\"" + locName + "\\" + datestr + "\\" + datestr_2 + "\"", ctou(data[i++]), str); | |
1340 | #ifdef DTIFMTTS_DEBUG | |
f3c0d7a5 | 1341 | char result[1000]; |
46f4442e A |
1342 | char mesg[1000]; |
1343 | PRINTMESG("interval format using user defined DateIntervalInfo\n"); | |
1344 | str.extract(0, str.length(), result, "UTF-8"); | |
1345 | sprintf(mesg, "interval date: %s\n", result); | |
1346 | PRINTMESG(mesg); | |
1347 | #endif | |
1348 | delete dtitvfmt; | |
1349 | } | |
1350 | } | |
1351 | ||
1352 | ||
1353 | void DateIntervalFormatTest::testStress() { | |
1354 | if(quick){ | |
1355 | logln("Quick mode: Skipping test"); | |
1356 | return; | |
1357 | } | |
1358 | const char* DATA[] = { | |
1359 | "yyyy MM dd HH:mm:ss", | |
f3c0d7a5 A |
1360 | "2007 10 10 10:10:10", "2008 10 10 10:10:10", |
1361 | "2007 10 10 10:10:10", "2007 11 10 10:10:10", | |
1362 | "2007 11 10 10:10:10", "2007 11 20 10:10:10", | |
1363 | "2007 01 10 10:00:10", "2007 01 10 14:10:10", | |
1364 | "2007 01 10 10:00:10", "2007 01 10 10:20:10", | |
1365 | "2007 01 10 10:10:10", "2007 01 10 10:10:20", | |
46f4442e A |
1366 | }; |
1367 | ||
1368 | const char* testLocale[][3] = { | |
1369 | //{"th", "", ""}, | |
1370 | {"en", "", ""}, | |
1371 | {"zh", "", ""}, | |
1372 | {"de", "", ""}, | |
1373 | {"ar", "", ""}, | |
1374 | {"en", "GB", ""}, | |
1375 | {"fr", "", ""}, | |
1376 | {"it", "", ""}, | |
1377 | {"nl", "", ""}, | |
1378 | {"zh", "TW", ""}, | |
1379 | {"ja", "", ""}, | |
1380 | {"pt", "BR", ""}, | |
1381 | {"ru", "", ""}, | |
1382 | {"pl", "", ""}, | |
1383 | {"tr", "", ""}, | |
1384 | {"es", "", ""}, | |
1385 | {"ko", "", ""}, | |
1386 | {"sv", "", ""}, | |
1387 | {"fi", "", ""}, | |
1388 | {"da", "", ""}, | |
1389 | {"pt", "PT", ""}, | |
1390 | {"ro", "", ""}, | |
1391 | {"hu", "", ""}, | |
1392 | {"he", "", ""}, | |
1393 | {"in", "", ""}, | |
1394 | {"cs", "", ""}, | |
1395 | {"el", "", ""}, | |
1396 | {"no", "", ""}, | |
1397 | {"vi", "", ""}, | |
1398 | {"bg", "", ""}, | |
1399 | {"hr", "", ""}, | |
1400 | {"lt", "", ""}, | |
1401 | {"sk", "", ""}, | |
1402 | {"sl", "", ""}, | |
1403 | {"sr", "", ""}, | |
1404 | {"ca", "", ""}, | |
1405 | {"lv", "", ""}, | |
1406 | {"uk", "", ""}, | |
1407 | {"hi", "", ""}, | |
1408 | }; | |
1409 | ||
1410 | uint32_t localeIndex; | |
2ca993e8 | 1411 | for ( localeIndex = 0; localeIndex < UPRV_LENGTHOF(testLocale); ++localeIndex ) { |
46f4442e A |
1412 | char locName[32]; |
1413 | uprv_strcpy(locName, testLocale[localeIndex][0]); | |
1414 | uprv_strcat(locName, testLocale[localeIndex][1]); | |
2ca993e8 | 1415 | stress(DATA, UPRV_LENGTHOF(DATA), Locale(testLocale[localeIndex][0], testLocale[localeIndex][1], testLocale[localeIndex][2]), locName); |
46f4442e A |
1416 | } |
1417 | } | |
1418 | ||
1419 | ||
1420 | void DateIntervalFormatTest::stress(const char** data, int32_t data_length, | |
1421 | const Locale& loc, const char* locName) { | |
1422 | UnicodeString skeleton[] = { | |
1423 | "EEEEdMMMMy", | |
1424 | "dMMMMy", | |
1425 | "dMMMM", | |
1426 | "MMMMy", | |
1427 | "EEEEdMMMM", | |
1428 | "EdMMMy", | |
1429 | "dMMMy", | |
1430 | "dMMM", | |
1431 | "MMMy", | |
1432 | "EdMMM", | |
1433 | "EdMy", | |
1434 | "dMy", | |
1435 | "dM", | |
1436 | "My", | |
1437 | "EdM", | |
1438 | "d", | |
1439 | "Ed", | |
1440 | "y", | |
1441 | "M", | |
1442 | "MMM", | |
1443 | "MMMM", | |
1444 | "hm", | |
1445 | "hmv", | |
1446 | "hmz", | |
1447 | "h", | |
1448 | "hv", | |
1449 | "hz", | |
1450 | "EEddMMyyyy", // following could be normalized | |
f3c0d7a5 | 1451 | "EddMMy", |
46f4442e A |
1452 | "hhmm", |
1453 | "hhmmzz", | |
1454 | "hms", // following could not be normalized | |
1455 | "dMMMMMy", | |
1456 | "EEEEEdM", | |
1457 | }; | |
1458 | ||
1459 | int32_t i = 0; | |
1460 | UErrorCode ec = U_ZERO_ERROR; | |
1461 | UnicodeString str, str2; | |
1462 | SimpleDateFormat ref(data[i++], loc, ec); | |
1463 | if (!assertSuccess("construct SimpleDateFormat", ec)) return; | |
1464 | ||
1465 | #ifdef DTIFMTTS_DEBUG | |
f3c0d7a5 | 1466 | char result[1000]; |
46f4442e | 1467 | char mesg[1000]; |
f3c0d7a5 | 1468 | sprintf(mesg, "locale: %s\n", locName); |
46f4442e A |
1469 | PRINTMESG(mesg); |
1470 | #endif | |
1471 | ||
1472 | while (i<data_length) { | |
1473 | ||
1474 | // 'f' | |
1475 | const char* datestr = data[i++]; | |
1476 | const char* datestr_2 = data[i++]; | |
1477 | #ifdef DTIFMTTS_DEBUG | |
1478 | sprintf(mesg, "original date: %s - %s\n", datestr, datestr_2); | |
1479 | PRINTMESG(mesg) | |
1480 | #endif | |
1481 | UDate date = ref.parse(ctou(datestr), ec); | |
1482 | if (!assertSuccess("parse", ec)) return; | |
1483 | UDate date_2 = ref.parse(ctou(datestr_2), ec); | |
1484 | if (!assertSuccess("parse", ec)) return; | |
1485 | DateInterval dtitv(date, date_2); | |
1486 | ||
f3c0d7a5 A |
1487 | for ( uint32_t skeletonIndex = 0; |
1488 | skeletonIndex < UPRV_LENGTHOF(skeleton); | |
46f4442e A |
1489 | ++skeletonIndex ) { |
1490 | const UnicodeString& oneSkeleton = skeleton[skeletonIndex]; | |
1491 | DateIntervalFormat* dtitvfmt = DateIntervalFormat::createInstance(oneSkeleton, loc, ec); | |
1492 | if (!assertSuccess("createInstance(skeleton)", ec)) return; | |
1493 | /* | |
1494 | // reset the calendar to be Gregorian calendar for "th" | |
1495 | if ( uprv_strcmp(locName, "th") == 0 ) { | |
1496 | GregorianCalendar* gregCal = new GregorianCalendar(loc, ec); | |
1497 | if (!assertSuccess("GregorianCalendar()", ec)) return; | |
1498 | const DateFormat* dformat = dtitvfmt->getDateFormat(); | |
1499 | DateFormat* newOne = (DateFormat*)dformat->clone(); | |
1500 | newOne->adoptCalendar(gregCal); | |
1501 | //dtitvfmt->adoptDateFormat(newOne, ec); | |
1502 | dtitvfmt->setDateFormat(*newOne, ec); | |
1503 | delete newOne; | |
1504 | if (!assertSuccess("adoptDateFormat()", ec)) return; | |
1505 | } | |
1506 | */ | |
f3c0d7a5 | 1507 | FieldPosition pos(FieldPosition::DONT_CARE); |
46f4442e A |
1508 | dtitvfmt->format(&dtitv, str.remove(), pos, ec); |
1509 | if (!assertSuccess("format", ec)) return; | |
1510 | #ifdef DTIFMTTS_DEBUG | |
1511 | oneSkeleton.extract(0, oneSkeleton.length(), result, "UTF-8"); | |
1512 | sprintf(mesg, "interval by skeleton: %s\n", result); | |
1513 | PRINTMESG(mesg) | |
1514 | str.extract(0, str.length(), result, "UTF-8"); | |
1515 | sprintf(mesg, "interval date: %s\n", result); | |
1516 | PRINTMESG(mesg) | |
1517 | #endif | |
1518 | delete dtitvfmt; | |
1519 | } | |
1520 | ||
1521 | // test user created DateIntervalInfo | |
1522 | ec = U_ZERO_ERROR; | |
1523 | DateIntervalInfo* dtitvinf = new DateIntervalInfo(ec); | |
1524 | dtitvinf->setFallbackIntervalPattern("{0} --- {1}", ec); | |
1525 | dtitvinf->setIntervalPattern(UDAT_YEAR_ABBR_MONTH_DAY, UCAL_MONTH, "yyyy MMM d - MMM y",ec); | |
1526 | if (!assertSuccess("DateIntervalInfo::setIntervalPattern", ec)) return; | |
1527 | dtitvinf->setIntervalPattern(UDAT_YEAR_ABBR_MONTH_DAY, UCAL_HOUR_OF_DAY, "yyyy MMM d HH:mm - HH:mm", ec); | |
1528 | if (!assertSuccess("DateIntervalInfo::setIntervalPattern", ec)) return; | |
1529 | DateIntervalFormat* dtitvfmt = DateIntervalFormat::createInstance(UDAT_YEAR_ABBR_MONTH_DAY, loc, *dtitvinf, ec); | |
1530 | delete dtitvinf; | |
1531 | if (!assertSuccess("createInstance(skeleton,dtitvinf)", ec)) return; | |
f3c0d7a5 | 1532 | FieldPosition pos(FieldPosition::DONT_CARE); |
46f4442e A |
1533 | dtitvfmt->format(&dtitv, str.remove(), pos, ec); |
1534 | if ( uprv_strcmp(locName, "th") ) { | |
1535 | if (!assertSuccess("format", ec)) return; | |
1536 | #ifdef DTIFMTTS_DEBUG | |
1537 | PRINTMESG("interval format using user defined DateIntervalInfo\n"); | |
1538 | str.extract(0, str.length(), result, "UTF-8"); | |
1539 | sprintf(mesg, "interval date: %s\n", result); | |
1540 | PRINTMESG(mesg) | |
1541 | #endif | |
1542 | } else { | |
f3c0d7a5 | 1543 | // for "th", the default calendar is Budhist, |
46f4442e A |
1544 | // not Gregorian. |
1545 | assertTrue("Default calendar for \"th\" is Budhist", ec == U_ILLEGAL_ARGUMENT_ERROR); | |
1546 | ec = U_ZERO_ERROR; | |
1547 | } | |
1548 | delete dtitvfmt; | |
1549 | } | |
1550 | } | |
1551 | ||
b331163b A |
1552 | void DateIntervalFormatTest::testTicket11583_2() { |
1553 | UErrorCode status = U_ZERO_ERROR; | |
1554 | LocalPointer<DateIntervalFormat> fmt( | |
1555 | DateIntervalFormat::createInstance("yMMM", "es-US", status)); | |
1556 | if (!assertSuccess("Error create format object", status)) { | |
1557 | return; | |
1558 | } | |
1559 | DateInterval interval((UDate) 1232364615000.0, (UDate) 1328787015000.0); | |
1560 | UnicodeString appendTo; | |
1561 | FieldPosition fpos(FieldPosition::DONT_CARE); | |
f3c0d7a5 | 1562 | UnicodeString expected("ene. 2009\\u2009\\u2013\\u2009feb. 2012"); |
b331163b A |
1563 | assertEquals( |
1564 | "", | |
1565 | expected.unescape(), | |
1566 | fmt->format(&interval, appendTo, fpos, status)); | |
1567 | if (!assertSuccess("Error formatting", status)) { | |
1568 | return; | |
1569 | } | |
1570 | } | |
1571 | ||
2ca993e8 A |
1572 | |
1573 | void DateIntervalFormatTest::testTicket11985() { | |
1574 | UErrorCode status = U_ZERO_ERROR; | |
1575 | LocalPointer<DateIntervalFormat> fmt( | |
1576 | DateIntervalFormat::createInstance(UDAT_HOUR_MINUTE, Locale::getEnglish(), status)); | |
1577 | if (!assertSuccess("createInstance", status)) { | |
1578 | return; | |
1579 | } | |
1580 | UnicodeString pattern; | |
1581 | static_cast<const SimpleDateFormat*>(fmt->getDateFormat())->toPattern(pattern); | |
1582 | assertEquals("Format pattern", "h:mm a", pattern); | |
1583 | } | |
1584 | ||
f3c0d7a5 | 1585 | // Ticket 11669 - thread safety of DateIntervalFormat::format(). This test failed before |
2ca993e8 A |
1586 | // the implementation was fixed. |
1587 | ||
1588 | static const DateIntervalFormat *gIntervalFormatter = NULL; // The Formatter to be used concurrently by test threads. | |
1589 | static const DateInterval *gInterval = NULL; // The date interval to be formatted concurrently. | |
1590 | static const UnicodeString *gExpectedResult = NULL; | |
1591 | ||
1592 | void DateIntervalFormatTest::threadFunc11669(int32_t threadNum) { | |
1593 | (void)threadNum; | |
1594 | for (int loop=0; loop<1000; ++loop) { | |
1595 | UErrorCode status = U_ZERO_ERROR; | |
f3c0d7a5 | 1596 | FieldPosition pos(FieldPosition::DONT_CARE); |
2ca993e8 A |
1597 | UnicodeString result; |
1598 | gIntervalFormatter->format(gInterval, result, pos, status); | |
1599 | if (U_FAILURE(status)) { | |
1600 | errln("%s:%d %s", __FILE__, __LINE__, u_errorName(status)); | |
1601 | return; | |
1602 | } | |
1603 | if (result != *gExpectedResult) { | |
1604 | errln("%s:%d Expected \"%s\", got \"%s\"", __FILE__, __LINE__, CStr(*gExpectedResult)(), CStr(result)()); | |
1605 | return; | |
1606 | } | |
1607 | } | |
1608 | } | |
f3c0d7a5 | 1609 | |
2ca993e8 A |
1610 | void DateIntervalFormatTest::testTicket11669() { |
1611 | UErrorCode status = U_ZERO_ERROR; | |
1612 | LocalPointer<DateIntervalFormat> formatter(DateIntervalFormat::createInstance(UDAT_YEAR_MONTH_DAY, Locale::getEnglish(), status), status); | |
1613 | LocalPointer<TimeZone> tz(TimeZone::createTimeZone("America/Los_Angleles"), status); | |
1614 | LocalPointer<Calendar> intervalStart(Calendar::createInstance(*tz, Locale::getEnglish(), status), status); | |
1615 | LocalPointer<Calendar> intervalEnd(Calendar::createInstance(*tz, Locale::getEnglish(), status), status); | |
1616 | if (U_FAILURE(status)) { | |
1617 | errcheckln(status, "%s:%d %s", __FILE__, __LINE__, u_errorName(status)); | |
1618 | return; | |
1619 | } | |
1620 | ||
1621 | intervalStart->set(2009, 6, 1, 14, 0); | |
1622 | intervalEnd->set(2009, 6, 2, 14, 0); | |
1623 | DateInterval interval(intervalStart->getTime(status), intervalEnd->getTime(status)); | |
f3c0d7a5 | 1624 | FieldPosition pos(FieldPosition::DONT_CARE); |
2ca993e8 A |
1625 | UnicodeString expectedResult; |
1626 | formatter->format(&interval, expectedResult, pos, status); | |
1627 | if (U_FAILURE(status)) { | |
1628 | errln("%s:%d %s", __FILE__, __LINE__, u_errorName(status)); | |
1629 | return; | |
1630 | } | |
1631 | ||
1632 | gInterval = &interval; | |
1633 | gIntervalFormatter = formatter.getAlias(); | |
1634 | gExpectedResult = &expectedResult; | |
1635 | ||
1636 | ThreadPool<DateIntervalFormatTest> threads(this, 4, &DateIntervalFormatTest::threadFunc11669); | |
1637 | threads.start(); | |
1638 | threads.join(); | |
1639 | ||
1640 | gInterval = NULL; // Don't leave dangling pointers lying around. Not strictly necessary. | |
1641 | gIntervalFormatter = NULL; | |
1642 | gExpectedResult = NULL; | |
1643 | } | |
1644 | ||
1645 | ||
f3c0d7a5 A |
1646 | // testTicket12065 |
1647 | // Using a DateIntervalFormat to format shouldn't change its state in any way | |
1648 | // that changes how the behavior of operator ==. | |
1649 | void DateIntervalFormatTest::testTicket12065() { | |
1650 | UErrorCode status = U_ZERO_ERROR; | |
1651 | LocalPointer<DateIntervalFormat> formatter(DateIntervalFormat::createInstance(UDAT_YEAR_MONTH_DAY, Locale::getEnglish(), status), status); | |
1652 | if (formatter.isNull()) { | |
1653 | dataerrln("FAIL: DateIntervalFormat::createInstance failed for Locale::getEnglish()"); | |
1654 | return; | |
1655 | } | |
1656 | LocalPointer<DateIntervalFormat> clone(dynamic_cast<DateIntervalFormat *>(formatter->clone())); | |
1657 | if (*formatter != *clone) { | |
1658 | errln("%s:%d DateIntervalFormat and clone are not equal.", __FILE__, __LINE__); | |
1659 | return; | |
1660 | } | |
1661 | DateInterval interval((UDate) 1232364615000.0, (UDate) 1328787015000.0); | |
1662 | UnicodeString appendTo; | |
1663 | FieldPosition fpos(FieldPosition::DONT_CARE); | |
1664 | formatter->format(&interval, appendTo, fpos, status); | |
1665 | if (*formatter != *clone) { | |
1666 | errln("%s:%d DateIntervalFormat and clone are not equal after formatting.", __FILE__, __LINE__); | |
1667 | return; | |
1668 | } | |
1669 | if (U_FAILURE(status)) { | |
1670 | errln("%s:%d %s", __FILE__, __LINE__, u_errorName(status)); | |
1671 | } | |
1672 | } | |
1673 | ||
1674 | ||
3d1f044b A |
1675 | void DateIntervalFormatTest::testFormattedDateInterval() { |
1676 | IcuTestErrorCode status(*this, "testFormattedDateInterval"); | |
1677 | LocalPointer<DateIntervalFormat> fmt(DateIntervalFormat::createInstance(u"dMMMMy", "en-US", status), status); | |
1678 | ||
1679 | { | |
1680 | const char16_t* message = u"FormattedDateInterval test 1"; | |
1681 | const char16_t* expectedString = u"July 20\u2009\u2013\u200925, 2018"; | |
1682 | LocalPointer<Calendar> input1(Calendar::createInstance("en-GB", status)); | |
1683 | if (status.errIfFailureAndReset()) { return; } | |
1684 | LocalPointer<Calendar> input2(Calendar::createInstance("en-GB", status)); | |
1685 | if (status.errIfFailureAndReset()) { return; } | |
1686 | input1->set(2018, 6, 20); | |
1687 | input2->set(2018, 6, 25); | |
1688 | FormattedDateInterval result = fmt->formatToValue(*input1, *input2, status); | |
1689 | static const UFieldPositionWithCategory expectedFieldPositions[] = { | |
1690 | // field, begin index, end index | |
1691 | {UFIELD_CATEGORY_DATE, UDAT_MONTH_FIELD, 0, 4}, | |
1692 | {UFIELD_CATEGORY_DATE_INTERVAL_SPAN, 0, 5, 7}, | |
1693 | {UFIELD_CATEGORY_DATE, UDAT_DATE_FIELD, 5, 7}, | |
1694 | {UFIELD_CATEGORY_DATE_INTERVAL_SPAN, 1, 10, 12}, | |
1695 | {UFIELD_CATEGORY_DATE, UDAT_DATE_FIELD, 10, 12}, | |
1696 | {UFIELD_CATEGORY_DATE, UDAT_YEAR_FIELD, 14, 18}}; | |
1697 | checkMixedFormattedValue( | |
1698 | message, | |
1699 | result, | |
1700 | expectedString, | |
1701 | expectedFieldPositions, | |
1702 | UPRV_LENGTHOF(expectedFieldPositions)); | |
1703 | } | |
1704 | ||
1705 | // To test the fallback pattern behavior, make a custom DateIntervalInfo. | |
1706 | DateIntervalInfo dtitvinf(status); | |
1707 | dtitvinf.setFallbackIntervalPattern("<< {1} --- {0} >>", status); | |
1708 | fmt.adoptInsteadAndCheckErrorCode( | |
1709 | DateIntervalFormat::createInstance(u"dMMMMy", "en-US", dtitvinf, status), | |
1710 | status); | |
1711 | ||
1712 | { | |
1713 | const char16_t* message = u"FormattedDateInterval with fallback format test 1"; | |
1714 | const char16_t* expectedString = u"<< July 25, 2018 --- July 20, 2018 >>"; | |
1715 | LocalPointer<Calendar> input1(Calendar::createInstance("en-GB", status)); | |
1716 | if (status.errIfFailureAndReset()) { return; } | |
1717 | LocalPointer<Calendar> input2(Calendar::createInstance("en-GB", status)); | |
1718 | if (status.errIfFailureAndReset()) { return; } | |
1719 | input1->set(2018, 6, 20); | |
1720 | input2->set(2018, 6, 25); | |
1721 | FormattedDateInterval result = fmt->formatToValue(*input1, *input2, status); | |
1722 | static const UFieldPositionWithCategory expectedFieldPositions[] = { | |
1723 | // field, begin index, end index | |
1724 | {UFIELD_CATEGORY_DATE_INTERVAL_SPAN, 1, 3, 16}, | |
1725 | {UFIELD_CATEGORY_DATE, UDAT_MONTH_FIELD, 3, 7}, | |
1726 | {UFIELD_CATEGORY_DATE, UDAT_DATE_FIELD, 8, 10}, | |
1727 | {UFIELD_CATEGORY_DATE, UDAT_YEAR_FIELD, 12, 16}, | |
1728 | {UFIELD_CATEGORY_DATE_INTERVAL_SPAN, 0, 21, 34}, | |
1729 | {UFIELD_CATEGORY_DATE, UDAT_MONTH_FIELD, 21, 25}, | |
1730 | {UFIELD_CATEGORY_DATE, UDAT_DATE_FIELD, 26, 28}, | |
1731 | {UFIELD_CATEGORY_DATE, UDAT_YEAR_FIELD, 30, 34}}; | |
1732 | checkMixedFormattedValue( | |
1733 | message, | |
1734 | result, | |
1735 | expectedString, | |
1736 | expectedFieldPositions, | |
1737 | UPRV_LENGTHOF(expectedFieldPositions)); | |
1738 | } | |
1739 | } | |
1740 | ||
1741 | ||
46f4442e | 1742 | #endif /* #if !UCONFIG_NO_FORMATTING */ |